zulip: Fix call_on_each_event.

Fix Improper assignement of narrow variable outside its scope.
This commit is contained in:
LoopThrough-i-j 2021-04-27 01:24:03 +05:30 committed by Tim Abbott
parent 175972ce49
commit 3c3c361f50

View file

@ -623,11 +623,12 @@ class Client:
narrow = []
def do_register() -> Tuple[str, int]:
if event_types is None:
narrow = None
while True:
res = self.register(event_types, narrow, **kwargs)
if event_types is None:
res = self.register(None, None, **kwargs)
else:
res = self.register(event_types, narrow, **kwargs)
if 'error' in res['result']:
if self.verbose:
print("Server returned error:\n%s" % (res['msg'],))