mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
compose: Fix buggy recipient id code.
`selected_recipient_id` is supposed to be an id, not a stream name. This function is currently only ever called for direct messages, so there's no present user-facing bug.
This commit is contained in:
parent
91d32d9f16
commit
afd703fe77
@ -97,11 +97,9 @@ export function set_stream_name(stream_name) {
|
||||
compose_recipient.set_selected_recipient_id(stream_id);
|
||||
}
|
||||
|
||||
export function set_compose_recipient_id(value) {
|
||||
let recipient_id = compose_recipient.DIRECT_MESSAGE_ID;
|
||||
if (typeof value === "number") {
|
||||
// value is stream name
|
||||
recipient_id = sub_store.maybe_get_stream_name(value) || "";
|
||||
export function set_compose_recipient_id(recipient_id) {
|
||||
if (typeof recipient_id !== "number") {
|
||||
recipient_id = compose_recipient.DIRECT_MESSAGE_ID;
|
||||
}
|
||||
compose_recipient.set_selected_recipient_id(recipient_id);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user