From 409bb587429ec4dcb1220a8ed85ec1618ffde0ed Mon Sep 17 00:00:00 2001 From: Ahmad Jarara Date: Tue, 22 Aug 2017 19:33:10 -0400 Subject: [PATCH] api: set event_types to empty list if not supplied in register. Previously, if you didn't specify a list of `event_types` in either `register` or `call_on_each_event`, you'd get an exception due to the invalid event format. This fixes #86. --- zulip/zulip/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index d480d3a..e1bab47 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -616,6 +616,9 @@ class Client(object): if narrow is None: narrow = [] + if event_types is None: + event_types = [] + request = dict( event_types=event_types, narrow=narrow,