mirror of https://github.com/zulip/zulip.git
Fix website improperly submitting a last value of -1.
We were submitting a 'last' value of -1 to the server at startup, which is invalid but normally ended up being OK because the user usually had no messages whatsoever or had last be updated via get_old_messages before the get_updates call went through. (imported from commit df55ac1cdac443721c06ebed94a1c4b3ec7af2d1)
This commit is contained in:
parent
aa0924f36b
commit
0dda71fb54
|
@ -8,7 +8,6 @@ var viewport = $(window);
|
|||
var selected_message_id = -1; /* to be filled in on document.ready */
|
||||
var selected_message = $(); /* = rows.get(selected_message_id) */
|
||||
var get_updates_params = {
|
||||
last: -1,
|
||||
pointer: -1,
|
||||
server_generation: -1 /* to be filled in on document.ready */
|
||||
};
|
||||
|
@ -416,7 +415,7 @@ function add_message_metadata(message, dummy) {
|
|||
if (message_dict[message.id]) {
|
||||
return message_dict[message.id];
|
||||
}
|
||||
get_updates_params.last = Math.max(get_updates_params.last, message.id);
|
||||
get_updates_params.last = Math.max(get_updates_params.last || 0, message.id);
|
||||
|
||||
var involved_people;
|
||||
|
||||
|
|
Loading…
Reference in New Issue