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

30 lines
863 B
Go
Raw Normal View History

2023-02-02 19:40:54 +08:00
package localcache
import (
2023-02-09 16:11:18 +08:00
discoveryRegistry "Open_IM/pkg/discoveryregistry"
2023-02-02 19:40:54 +08:00
"context"
"sync"
)
2023-02-08 17:56:04 +08:00
type ConversationLocalCacheInterface interface {
2023-02-09 14:40:49 +08:00
GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) ([]string, error)
2023-02-08 17:56:04 +08:00
}
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
}
}
2023-02-09 14:40:49 +08:00
func (g *ConversationLocalCache) GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) ([]string, error) {
2023-02-08 18:29:11 +08:00
g.client.GetConn()
2023-02-02 19:40:54 +08:00
return []string{}
}