mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 05:58:25 +00:00
widgets: Clean up index handling.
We only need to bump up indexes if inbound events suggest that we have incremented our personal index from another device. We don't want somebody else's runaway index to affect our index. (For both widgets the sender_id is part of the key, so uniqueness across all senders is not required for the integer part.)
This commit is contained in:
@@ -108,7 +108,8 @@ export class PollData {
|
||||
votes,
|
||||
});
|
||||
|
||||
if (this.my_idx <= idx) {
|
||||
// I may have added a poll option from another device.
|
||||
if (sender_id === this.me && this.my_idx <= idx) {
|
||||
this.my_idx = idx + 1;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user