events_register_backend: Validate client_capabilities type correctly.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-06-20 18:23:12 -07:00 committed by Tim Abbott
parent 475fc5910f
commit 717e349834
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ def events_register_backend(
# Any new fields of `client_capabilities` should be optional. Add them here.
("bulk_message_deletion", check_bool),
('user_avatar_url_field_optional', check_bool),
]), default=None),
], value_validator=check_bool), default=None),
event_types: Optional[Iterable[str]]=REQ(validator=check_list(check_string), default=None),
fetch_event_types: Optional[Iterable[str]]=REQ(validator=check_list(check_string), default=None),
narrow: NarrowT=REQ(validator=check_list(check_list(check_string, length=2)), default=[]),