Skip to content

Commit

Permalink
zulip: Don’t carry over last_event_id between queues
Browse files Browse the repository at this point in the history
It was never possible to use `last_event_id` to request events from
before the current queue was created.  In Zulip master, this API usage
mistake is detected and raised as an error
(zulip/zulip#12938), so Snipe would stop
receiving messages after a server restart.

Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk authored and kcr committed Oct 8, 2019
1 parent 9c14887 commit 355ccc0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions snipe/zulip.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ async def connect(self):
self.state_set(messages.BackendState.CONNECTING)
try:
self.params = None
last_event_id = None
attempt = 0
while True:
attempt += 1
Expand All @@ -158,8 +157,7 @@ async def connect(self):
self.params = params

queue_id = params['queue_id']
if last_event_id is None:
last_event_id = params['last_event_id']
last_event_id = params['last_event_id']

self._senders |= set(
'; '.join((self.name, x['email']))
Expand Down

0 comments on commit 355ccc0

Please sign in to comment.