mirror of https://github.com/zulip/zulip.git
message_events: Pass correct new stream id to recent_senders.
We were passing new_stream_id as undefined in case of topic edit as event.new_stream_id is undefined in that case. We pass the correct stream_id to fix it.
This commit is contained in:
parent
ee375e2999
commit
07f972f45a
|
@ -387,12 +387,16 @@ export function update_messages(events) {
|
|||
pre_edit_topic = msg.topic;
|
||||
post_edit_topic = pre_edit_topic;
|
||||
}
|
||||
const args = [event.stream_id, pre_edit_topic, post_edit_topic, new_stream_id];
|
||||
|
||||
// new_stream_id is undefined if this is only a topic edit.
|
||||
const post_edit_stream_id = new_stream_id || event.stream_id;
|
||||
|
||||
const args = [event.stream_id, pre_edit_topic, post_edit_topic, post_edit_stream_id];
|
||||
recent_senders.process_topic_edit({
|
||||
message_ids: event.message_ids,
|
||||
old_stream_id: event.stream_id,
|
||||
old_topic: pre_edit_topic,
|
||||
new_stream_id,
|
||||
new_stream_id: post_edit_stream_id,
|
||||
new_topic: post_edit_topic,
|
||||
});
|
||||
recent_topics.process_topic_edit(...args);
|
||||
|
|
Loading…
Reference in New Issue