Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

This commit is contained in:
wangchuxiao
2023-05-19 16:12:06 +08:00
5 changed files with 55 additions and 14 deletions
+5 -3
View File
@@ -222,9 +222,11 @@ func (c *ConversationDataBase) CreateGroupChatConversation(ctx context.Context,
conversations = append(conversations, &conversation)
}
cache = cache.DelConversationIDs(notExistUserIDs...).DelUserConversationIDsHash(notExistUserIDs...)
err = c.conversationDB.Create(ctx, conversations)
if err != nil {
return err
if len(conversations) > 0 {
err = c.conversationDB.Create(ctx, conversations)
if err != nil {
return err
}
}
_, err = c.conversationDB.UpdateByMap(ctx, existConversationUserIDs, conversationID, map[string]interface{}{"max_seq": 0})
if err != nil {