left sidebar: Fix "Compose" in stream actions popover prefills topic.

Fixes #8824.
This commit is contained in:
Balaji2198 2018-03-30 11:13:21 +05:30 committed by Tim Abbott
parent 3cfc760506
commit 15d42f86f1
1 changed files with 6 additions and 3 deletions

View File

@ -191,9 +191,12 @@ exports.start = function (msg_type, opts) {
exports.expand_compose_box(); exports.expand_compose_box();
opts = fill_in_opts_from_current_narrowed_view(msg_type, opts); opts = fill_in_opts_from_current_narrowed_view(msg_type, opts);
// If we are invoked by a compose hotkey (c or x), do not assume that we know // If we are invoked by a compose hotkey (c or x) or new topic button
// what the message's topic or PM recipient should be. // or sidebar stream actions (in stream popover), do not assume that we know what
if ((opts.trigger === "compose_hotkey") || (opts.trigger === "new topic button")) { // the message's topic or PM recipient should be.
if ((opts.trigger === "compose_hotkey") ||
(opts.trigger === "new topic button") ||
(opts.trigger === "sidebar stream actions")) {
opts.subject = ''; opts.subject = '';
opts.private_message_recipient = ''; opts.private_message_recipient = '';
} }