mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Remove message.is_mentioned in message events.
This field would get overwritten with an improper value when we looped over multiple clients, due to not making full copies of the message dictionary. This failure would be somewhat random depending on how clients were ordered in the loop. The only consumers of this field were the mobile app and the apply-events-to-unread-counts logic. Both of these will now use `flags` instead.
This commit is contained in:
@@ -554,7 +554,6 @@ class EventsRegisterTest(ZulipTestCase):
|
||||
('content', check_string),
|
||||
('content_type', equals('text/html')),
|
||||
('display_recipient', check_string),
|
||||
('is_mentioned', check_bool),
|
||||
('is_me_message', check_bool),
|
||||
('reactions', check_list(None)),
|
||||
('recipient_id', check_int),
|
||||
|
||||
@@ -779,8 +779,6 @@ def process_message_event(event_template, users):
|
||||
message_dict = message_dict.copy()
|
||||
message_dict["invite_only_stream"] = True
|
||||
|
||||
if flags is not None:
|
||||
message_dict['is_mentioned'] = 'mentioned' in flags
|
||||
user_event = dict(type='message', message=message_dict, flags=flags) # type: Dict[str, Any]
|
||||
if extra_data is not None:
|
||||
user_event.update(extra_data)
|
||||
|
||||
Reference in New Issue
Block a user