Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

evykassirer8cee3dfbf24d
diff --git a/web/src/drafts.js b/web/src/drafts.js
index 6006ed8ce49..4fa863669b5 100644
--- a/web/src/drafts.js
+++ b/web/src/drafts.js
@@ -199,11 +199,9 @@ export function snapshot_message() {
message.reply_to = recipient;
message.private_message_recipient = recipient;
} else {
- message.stream = compose_state.stream_name();
- const sub = stream_data.get_sub(message.stream);
- if (sub) {
- message.stream_id = sub.stream_id;
- }
+ message.stream_id = compose_state.stream_id();
+ const sub = stream_data.get_sub_by_id(message.stream_id);
+ message.stream = sub ? sub.name : "";
message.topic = compose_state.topic();
}
return message;