Skip to content

Commit

Permalink
Fix for deleted messages staying unread (#4386)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Sep 15, 2023
1 parent 56568c8 commit e5b242a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
let messageIndex =
evt.event.kind === "message"
? evt.event.messageIndex
: evt.event.messagesDeleted[evt.event.messagesDeleted.length - 1];
: Math.max(...evt.event.messagesDeleted);
let messageId = evt.event.kind === "message" ? evt.event.messageId : undefined;
const isRead = client.isMessageRead(chat.id, messageIndex, messageId);
if (!isRead && evt.event.kind === "message" && evt.event.sender === user.userId) {
Expand Down

0 comments on commit e5b242a

Please sign in to comment.