mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 10:03:56 +00:00
events: Add op field to update_message_flags events.
`update_message_flags` events used `operation` instead of `op`, the latter being the standard field used in other events. So add `op` field to `update_message_flags` and mark `operation` as deprecated, so that it can be removed later.
This commit is contained in:
@@ -811,6 +811,7 @@ check_update_message_embedded = check_events_dict(
|
||||
_check_update_message_flags = check_events_dict(
|
||||
required_keys=[
|
||||
("type", equals("update_message_flags")),
|
||||
("op", check_add_or_remove),
|
||||
("operation", check_add_or_remove),
|
||||
("flag", check_string),
|
||||
("messages", check_list(check_int)),
|
||||
@@ -823,7 +824,7 @@ def check_update_message_flags(
|
||||
var_name: str, event: Dict[str, object], operation: str
|
||||
) -> None:
|
||||
_check_update_message_flags(var_name, event)
|
||||
assert event["operation"] == operation
|
||||
assert event["operation"] == operation and event['op'] == operation
|
||||
|
||||
|
||||
_check_group = check_dict_only(
|
||||
|
||||
Reference in New Issue
Block a user