mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-03 14:31:43 +08:00
signal
This commit is contained in:
parent
f8b4cbcc13
commit
34c091f232
@ -10,12 +10,15 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
|
|
||||||
//goRedis "github.com/go-redis/redis/v8"
|
//goRedis "github.com/go-redis/redis/v8"
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"github.com/mitchellh/mapstructure"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
|
"github.com/mitchellh/mapstructure"
|
||||||
)
|
)
|
||||||
|
|
||||||
//func (d * DataBases)pubMessage(channel, msg string) {
|
//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())
|
log2.NewDebug("", utils.GetSelfFuncName(), result, result.String())
|
||||||
invitationInfo, err = d.GetSignalInfoFromCacheByClientMsgID(key)
|
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"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/golang/protobuf/jsonpb"
|
"github.com/golang/protobuf/jsonpb"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
//osconfig "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha"
|
//osconfig "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user