A platform for community discussion. Free, open, simple.
FIX: do not attempt to mark as read a staged message (#21764)
Joffrey JAFFEUX4676524094ae
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel.js b/plugins/chat/assets/javascripts/discourse/components/chat-channel.jsindex d8f4df63c7d..cd2d59b2ddb 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel.js+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel.js@@ -462,7 +462,7 @@ export default class ChatLivePane extends Component {const lastReadId =this.args.channel.currentUserMembership?.lastReadMessageId;let lastUnreadVisibleMessage = this.args.channel.visibleMessages.findLast(- (message) => !lastReadId || message.id > lastReadId+ (message) => !message.staged && (!lastReadId || message.id > lastReadId));// all intersecting messages are read