Files
open-im-server/pkg/common/db/localcache/conversation.go
T

30 lines
846 B
Go
Raw Normal View History

2023-02-02 19:40:54 +08:00
package localcache
import (
2023-02-08 18:29:11 +08:00
discoveryRegistry "Open_IM/pkg/discovery_registry"
2023-02-02 19:40:54 +08:00
"context"
"sync"
)
2023-02-08 17:56:04 +08:00
type ConversationLocalCacheInterface interface {
GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) []string
}
2023-02-02 19:40:54 +08:00
type ConversationLocalCache struct {
lock sync.Mutex
SuperGroupRecvMsgNotNotifyUserIDs map[string][]string
2023-02-08 18:29:11 +08:00
client discoveryRegistry.SvcDiscoveryRegistry
2023-02-02 19:40:54 +08:00
}
2023-02-08 18:29:11 +08:00
func NewConversationLocalCache(client discoveryRegistry.SvcDiscoveryRegistry) ConversationLocalCache {
2023-02-02 19:40:54 +08:00
return ConversationLocalCache{
SuperGroupRecvMsgNotNotifyUserIDs: make(map[string][]string, 0),
2023-02-08 18:29:11 +08:00
client: client,
2023-02-02 19:40:54 +08:00
}
}
func (g *ConversationLocalCache) GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) []string {
2023-02-08 18:29:11 +08:00
g.client.GetConn()
2023-02-02 19:40:54 +08:00
return []string{}
}