openimsdk / open-im-server

IM Chat
https://openim.io
Apache License 2.0
13.35k stars 2.35k forks source link

[Other]: Direct Conversation Clearing Causes Read Status Update Issue #2374

Open zhaolibo1989 opened 3 days ago

zhaolibo1989 commented 3 days ago

What would you like to share?

Before marking the conversation as read (MarkConversationAsRead) or marking the messages as read (MarkMsgsAsRead), if the conversation is cleared directly (clearConversation), it will only set the read sequence number (HasReadSeq), but will not send a read receipt (HasReadReceipt). This will cause the read status of the message to not be updated, and the sender will always see the message as "unread" (is_read=false). I am not sure if a read receipt should be sent here. If HasReadSeq represents the read position, meaning "I have read all messages up to this sequence number", then these unread messages should be marked as read (is_read=true). On the opposite, if reading requires explicitly using the "Mark as Read" interface, like MarkConversationAsRead and MarkMsgsAsRead, then directly clearing the conversation should not include the "Mark as Read" functionality. So, when I clear the conversation directly before marking it as read, the sender of the message always sees the message as "unread," is this a issue?

Additional information

No response

zhaolibo1989 commented 3 days ago

func: clearConversation