compose: Add trigger for new private message.

This commit adds a new trigger for compose.start that is
"new private message". It will clear the message recipients
whenever compose.start is called with this trigger.

This solves the bug, when a person is in a PM narrow and
clicks the new private message button, it opens the
composebox with the recipients filled out with whoever
you're narrowed to, rather than opening a new, blank PM.

CZO link for the issue
https://chat.zulip.org/#narrow/stream/9-issues/topic/.22New.20private.20message.22.20isn't/near/1222712
This commit is contained in:
Priyam Seth
2021-07-05 15:18:15 +05:30
committed by Tim Abbott
parent 6a04648fd7
commit 985e95041d
3 changed files with 17 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ export function initialize() {
});
$("body").on("click", ".compose_private_button", () => {
compose_actions.start("private");
compose_actions.start("private", {trigger: "new private message"});
});
$("body").on("click", ".compose_reply_button", () => {