mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
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:
@@ -223,7 +223,11 @@ export function start(msg_type, opts) {
|
||||
// If we are invoked by a compose hotkey (c or x) or new topic
|
||||
// button, do not assume that we know what the message's topic or
|
||||
// PM recipient should be.
|
||||
if (opts.trigger === "compose_hotkey" || opts.trigger === "new topic button") {
|
||||
if (
|
||||
opts.trigger === "compose_hotkey" ||
|
||||
opts.trigger === "new topic button" ||
|
||||
opts.trigger === "new private message"
|
||||
) {
|
||||
opts.topic = "";
|
||||
opts.private_message_recipient = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user