mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
pb (#2958)
This commit is contained in:
parent
0435915df1
commit
97f506c366
@ -138,9 +138,16 @@ func (m *msgServer) clearConversation(ctx context.Context, conversationIDs []str
|
|||||||
}
|
}
|
||||||
isSyncSelf, isSyncOther := m.validateDeleteSyncOpt(deleteSyncOpt)
|
isSyncSelf, isSyncOther := m.validateDeleteSyncOpt(deleteSyncOpt)
|
||||||
if !isSyncOther {
|
if !isSyncOther {
|
||||||
if err := m.MsgDatabase.SetUserConversationsMinSeqs(ctx, userID, m.getMinSeqs(maxSeqs)); err != nil {
|
setSeqs := m.getMinSeqs(maxSeqs)
|
||||||
|
if err := m.MsgDatabase.SetUserConversationsMinSeqs(ctx, userID, setSeqs); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
ownerUserIDs := []string{userID}
|
||||||
|
for conversationID, seq := range setSeqs {
|
||||||
|
if err := m.Conversation.SetConversationMinSeq(ctx, ownerUserIDs, conversationID, seq); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
// notification 2 self
|
// notification 2 self
|
||||||
if isSyncSelf {
|
if isSyncSelf {
|
||||||
tips := &sdkws.ClearConversationTips{UserID: userID, ConversationIDs: existConversationIDs}
|
tips := &sdkws.ClearConversationTips{UserID: userID, ConversationIDs: existConversationIDs}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user