Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions frontend/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,10 @@ function selectUser(name) {
selectedUser = name;
currentChannel = null; // hide channel context
clearUnread(name);
// Load the conversation then explicitly notify the server that we've
// displayed these messages to ensure read receipts and counters update.
loadMessages().then(() => markMessagesSeen(name));
// Load the conversation. Regardless of success or failure, inform the
// server that we've displayed these messages so read receipts and counters
// update correctly even if the history fails to render.
loadMessages().finally(() => markMessagesSeen(name));
}

// Verify the user is logged in before showing the dashboard
Expand Down