Make c/C compose to a new destination instead of being identical to r/R

R means "I want to send a PM, you can guess the destination"
r means "I want send a stream message, you can guess the destination"
C means "I want to send a PM and specify the destination"
c means "I want to send a stream message and specify the destination"

(imported from commit 4c93cc3029892c21accadd9624da70ee818dec68)
This commit is contained in:
Jeff Arnold 2013-11-26 15:46:34 -05:00
parent da3f1704ed
commit 2cd7c35875
2 changed files with 8 additions and 2 deletions

View File

@ -205,6 +205,12 @@ exports.start = function (msg_type, opts) {
$('.message_comp').show();
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
// what the message's topic or PM recipient should be.
if (opts.trigger === "compose_hotkey") {
opts.subject = '';
opts.private_message_recipient = '';
}
if (compose.composing() && !same_recipient_as_before(msg_type, opts)) {
// Clear the compose box if the existing message is to a different recipient

View File

@ -245,10 +245,10 @@ function process_hotkey(e) {
}
return true;
case 'compose': // 'c': compose
compose.start('stream');
compose.start('stream', {trigger: "compose_hotkey"});
return true;
case 'compose_private_message':
compose.start('private');
compose.start('private', {trigger: "compose_hotkey"});
return true;
case 'search':
search.initiate_search();