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:
Steve Howell
2017-10-11 16:25:00 -07:00
committed by Tim Abbott
parent fed972d1fb
commit 9ecf41980c
2 changed files with 0 additions and 3 deletions

View File

@@ -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),

View File

@@ -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)