FIX: do not attempt to mark as read a staged message (#21764)

This has not much impact as it would just be a silent 404 server side, but this is unnecessary work.
This commit is contained in:
Joffrey JAFFEUX 2023-05-26 11:00:48 +02:00 committed by GitHub
parent 0bff95fcad
commit 4676524094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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