Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

recent_topics: Add note about reify_message_id_if_available.

Aman Agrawal5931b69c5766
diff --git a/static/js/recent_topics.js b/static/js/recent_topics.js
index 9e90c62a44b..da70fb48643 100644
--- a/static/js/recent_topics.js
+++ b/static/js/recent_topics.js
@@ -54,6 +54,10 @@ exports.process_message = function (msg) {
};
exports.reify_message_id_if_available = function (opts) {
+ // We don't need to reify the message_id of the topic
+ // if a new message arrives in the topic from another user,
+ // since it replaces the last_msg_id of the topic which
+ // we were trying to reify.
for (const [, value] of topics.entries()) {
if (value.last_msg_id === opts.old_id) {
value.last_msg_id = opts.new_id;