This commit is contained in:
wangchuxiao
2023-05-08 12:39:45 +08:00
parent b34d1e7ee7
commit b95496df73
36 changed files with 969 additions and 981 deletions
+3 -2
View File
@@ -2,10 +2,11 @@ package localcache
import (
"context"
"sync"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
"sync"
)
type ConversationLocalCacheInterface interface {
@@ -26,7 +27,7 @@ func NewConversationLocalCache(client discoveryregistry.SvcDiscoveryRegistry) *C
}
func (g *ConversationLocalCache) GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) ([]string, error) {
conn, err := g.client.GetConn(config.Config.RpcRegisterName.OpenImConversationName)
conn, err := g.client.GetConn(ctx, config.Config.RpcRegisterName.OpenImConversationName)
if err != nil {
return nil, err
}
+3 -2
View File
@@ -2,11 +2,12 @@ package localcache
import (
"context"
"sync"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group"
"sync"
)
type GroupLocalCacheInterface interface {
@@ -34,7 +35,7 @@ func NewGroupLocalCache(client discoveryregistry.SvcDiscoveryRegistry) *GroupLoc
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error) {
g.lock.Lock()
defer g.lock.Unlock()
conn, err := g.client.GetConn(config.Config.RpcRegisterName.OpenImGroupName)
conn, err := g.client.GetConn(ctx, config.Config.RpcRegisterName.OpenImGroupName)
if err != nil {
return nil, err
}