zulip: Fix call_on_each_event.
Fix Improper assignement of narrow variable outside its scope.
MODIFY
zulip/zulip/__init__.py
zulip/zulip/__init__.py
@@ -623,10 +623,11 @@ class Client:
narrow = []
def do_register() -> Tuple[str, int]:
- if event_types is None:
- narrow = None
while True:
+ 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:

zulip: Fix call_on_each_event.

Fix Improper assignement of narrow variable outside its scope.