eat: add filtering for invalid messages and invalid conversations to prevent data-fetching exceptions after conversations are deleted.

This commit is contained in:
Gordon
2025-07-29 16:00:08 +08:00
parent 55113e5277
commit a893141ae6
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -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)
}
}