mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-16 14:59:01 +08:00
eat: add filtering for invalid messages and invalid conversations to prevent data-fetching exceptions after conversations are deleted.
This commit is contained in:
@@ -266,7 +266,9 @@ func (x *JSSdk) checkMessagesAndGetLastMessage(ctx context.Context, userID strin
|
||||
break
|
||||
}
|
||||
}
|
||||
if allInValid {
|
||||
|
||||
// when the conversation has been deleted by the user, the length of message.Msgs is empty
|
||||
if allInValid && len(message.Msgs) > 0 {
|
||||
conversationIDs = append(conversationIDs, conversationID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user