do_update_message: Remove sender field from update_message events.

This field wasn't accessed by any clients and was a less robust
version of the user_id field.  Any client hoping to be interested in
who did message edits should be able to handle working with user IDs
rather than email addresses.
This commit is contained in:
Tim Abbott 2020-02-26 16:16:01 -08:00
parent 588bcb37cf
commit 2fb967b735
2 changed files with 0 additions and 4 deletions

View File

@ -4496,9 +4496,6 @@ def do_update_message(user_profile: UserProfile, message: Message, topic_name: O
message.last_edit_time = timestamp
event = {'type': 'update_message',
# TODO: We probably want to remove the 'sender' field
# after confirming it isn't used by any consumers.
'sender': user_profile.email,
'user_id': user_profile.id,
'edit_timestamp': datetime_to_timestamp(timestamp),
'message_id': message.id} # type: Dict[str, Any]

View File

@ -725,7 +725,6 @@ class EventsRegisterTest(ZulipTestCase):
('prev_rendered_content_version', check_int),
('propagate_mode', check_string),
('rendered_content', check_string),
('sender', check_string),
('stream_id', check_int),
('stream_name', check_string),
(TOPIC_NAME, check_string),