snapshot_message: Get stream id from name instead of name from id.

This commit is contained in:
evykassirer 2023-06-26 10:12:00 -07:00 committed by Tim Abbott
parent d9edcba724
commit 8cee3dfbf2
1 changed files with 3 additions and 5 deletions

View File

@ -199,11 +199,9 @@ export function snapshot_message() {
message.reply_to = recipient; message.reply_to = recipient;
message.private_message_recipient = recipient; message.private_message_recipient = recipient;
} else { } else {
message.stream = compose_state.stream_name(); message.stream_id = compose_state.stream_id();
const sub = stream_data.get_sub(message.stream); const sub = stream_data.get_sub_by_id(message.stream_id);
if (sub) { message.stream = sub ? sub.name : "";
message.stream_id = sub.stream_id;
}
message.topic = compose_state.topic(); message.topic = compose_state.topic();
} }
return message; return message;