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.

message_fetch: Stop infinite fetch for first unread message id.

Aman Agrawalc8379b4f9a12
diff --git a/web/src/message_fetch.js b/web/src/message_fetch.js
index 38d40dc7529..6c6c10908b4 100644
--- a/web/src/message_fetch.js
+++ b/web/src/message_fetch.js
@@ -465,7 +465,7 @@ export function maybe_load_older_messages(opts) {
let found_first_unread = opts.first_unread_message_id === undefined;
// This is a soft check because `first_unread_message_id` can be deleted.
- if (!found_first_unread && msg_list_data.first() <= opts.first_unread_message_id) {
+ if (!found_first_unread && msg_list_data.first().id <= opts.first_unread_message_id) {
found_first_unread = true;
}