do_update_message: Send old topic with stream edit event.

Old topic of the msg edit event can be used to help the client
calculate useful information such as if a change
in current narrow is required.

This fixes our re narrow logic after a stream edit of a topic, with
no change in topic name itself, since the original topic was not
present in the event received and hence the `orig_topic` was
undefined in this case.
This commit is contained in:
Aman Agrawal 2020-06-06 12:57:58 +05:30 committed by Tim Abbott
parent c394337118
commit e2ed155310
1 changed files with 1 additions and 0 deletions

View File

@ -4445,6 +4445,7 @@ def do_update_message(user_profile: UserProfile, message: Message,
assert stream_being_edited is not None
edit_history_event['prev_stream'] = stream_being_edited.id
event[ORIG_TOPIC] = orig_topic_name
message.recipient_id = new_stream.recipient_id
event["new_stream_id"] = new_stream.id