mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-30 10:19:22 +08:00
signal
This commit is contained in:
parent
f8b4cbcc13
commit
34c091f232
@ -10,12 +10,15 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/garyburd/redigo/redis"
|
||||
|
||||
//goRedis "github.com/go-redis/redis/v8"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
)
|
||||
|
||||
//func (d * DataBases)pubMessage(channel, msg string) {
|
||||
@ -177,5 +180,18 @@ func (d *DataBases) GetAvailableSignalInvitationInfo(userID string) (invitationI
|
||||
}
|
||||
log2.NewDebug("", utils.GetSelfFuncName(), result, result.String())
|
||||
invitationInfo, err = d.GetSignalInfoFromCacheByClientMsgID(key)
|
||||
return invitationInfo, utils.Wrap(err, "GetSignalInfoFromCacheByClientMsgID")
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "GetSignalInfoFromCacheByClientMsgID")
|
||||
}
|
||||
err = d.delUserSingalList(userID)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "GetSignalInfoFromCacheByClientMsgID")
|
||||
}
|
||||
return invitationInfo, nil
|
||||
}
|
||||
|
||||
func (d *DataBases) delUserSingalList(userID string) error {
|
||||
keyList := SignalListCache + userID
|
||||
err := d.rdb.Del(context.Background(), keyList).Err()
|
||||
return err
|
||||
}
|
||||
|
@ -11,9 +11,11 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/garyburd/redigo/redis"
|
||||
"github.com/golang/protobuf/jsonpb"
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
||||
//osconfig "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha"
|
||||
"strconv"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user