mirror of https://github.com/zulip/zulip.git
event_schema: Fix translation of typing events message_type.
This was incorrectly/lazily marked as a string, not as an enum of two string values, in the previous commit.
This commit is contained in:
parent
27e4f5da92
commit
1afc0496ca
|
@ -1315,11 +1315,18 @@ typing_person_type = DictType(
|
|||
]
|
||||
)
|
||||
|
||||
equals_private_or_stream = EnumType(
|
||||
[
|
||||
"private",
|
||||
"stream",
|
||||
]
|
||||
)
|
||||
|
||||
typing_start_event = event_dict_type(
|
||||
required_keys=[
|
||||
("type", Equals("typing")),
|
||||
("op", Equals("start")),
|
||||
("message_type", str),
|
||||
("message_type", equals_private_or_stream),
|
||||
("sender", typing_person_type),
|
||||
],
|
||||
optional_keys=[
|
||||
|
@ -1334,7 +1341,7 @@ typing_stop_event = event_dict_type(
|
|||
required_keys=[
|
||||
("type", Equals("typing")),
|
||||
("op", Equals("stop")),
|
||||
("message_type", str),
|
||||
("message_type", equals_private_or_stream),
|
||||
("sender", typing_person_type),
|
||||
],
|
||||
optional_keys=[
|
||||
|
|
Loading…
Reference in New Issue