mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
actions: Add assertion for invalid flag operations.
This commit is contained in:
@@ -2715,6 +2715,8 @@ def do_update_message_flags(user_profile, operation, flag, messages):
|
|||||||
count = msgs.update(flags=F('flags').bitor(flagattr))
|
count = msgs.update(flags=F('flags').bitor(flagattr))
|
||||||
elif operation == 'remove':
|
elif operation == 'remove':
|
||||||
count = msgs.update(flags=F('flags').bitand(~flagattr))
|
count = msgs.update(flags=F('flags').bitand(~flagattr))
|
||||||
|
else:
|
||||||
|
raise AssertionError("Invalid message flags operation")
|
||||||
|
|
||||||
event = {'type': 'update_message_flags',
|
event = {'type': 'update_message_flags',
|
||||||
'operation': operation,
|
'operation': operation,
|
||||||
|
|||||||
Reference in New Issue
Block a user