compose: Fix "New Topic" button behaviour auto-populates the current topic.

Previously, Clicking a "New Topic" in a topic narrow auto-populates
the current topic.

Fixes #8608.
This commit is contained in:
Balaji2198
2018-03-07 09:59:59 +05:30
committed by Tim Abbott
parent 12509515ae
commit 6ffe2cc815

View File

@@ -193,7 +193,7 @@ exports.start = function (msg_type, opts) {
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 C), do not assume that we know // If we are invoked by a compose hotkey (c or C), do not assume that we know
// what the message's topic or PM recipient should be. // what the message's topic or PM recipient should be.
if (opts.trigger === "compose_hotkey") { if ((opts.trigger === "compose_hotkey") || (opts.trigger === "new topic button")) {
opts.subject = ''; opts.subject = '';
opts.private_message_recipient = ''; opts.private_message_recipient = '';
} }