mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-10 04:59:49 +08:00
fix redis conversation key
This commit is contained in:
parent
be79131498
commit
b7b988dff5
@ -34,10 +34,11 @@ func (m *msgServer) UserClearAllMsg(ctx context.Context, req *msg.UserClearAllMs
|
||||
if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
conversationIDs, err := m.Conversation.GetConversationIDs(ctx, req.UserID)
|
||||
conversationIDs, err := m.ConversationLocalCache.GetConversationIDs(ctx, req.UserID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.ZDebug(ctx, "GetMaxSeq", "conversationIDs", conversationIDs)
|
||||
maxSeqs, err := m.MsgDatabase.GetMaxSeqs(ctx, conversationIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
2
pkg/common/db/cache/msg.go
vendored
2
pkg/common/db/cache/msg.go
vendored
@ -170,7 +170,7 @@ func (c *msgCache) GetMinSeq(ctx context.Context, conversationID string) (int64,
|
||||
}
|
||||
|
||||
func (c *msgCache) getConversationUserMinSeqKey(conversationID, userID string) string {
|
||||
return conversationUserMinSeq + "g:" + conversationID + "u:" + userID
|
||||
return conversationUserMinSeq + conversationID + "u:" + userID
|
||||
}
|
||||
|
||||
func (c *msgCache) GetConversationUserMinSeq(ctx context.Context, conversationID string, userID string) (int64, error) {
|
||||
|
@ -206,16 +206,6 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, userID, doc
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
////i := 0
|
||||
//for cursor.Next(ctx) {
|
||||
// err := cursor.Decode(&doc)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// //if i == 0 {
|
||||
// // break
|
||||
// //}
|
||||
//}
|
||||
log.ZDebug(ctx, "msgInfos", "num", len(doc.Msg), "docID", docID)
|
||||
for _, v := range doc.Msg {
|
||||
if v.Msg == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user