refactor: Extract compose.reply_with_mention().

This commit is contained in:
Steve Howell
2017-03-12 05:59:17 -07:00
committed by Tim Abbott
parent 0979aad226
commit 87a7313143
2 changed files with 8 additions and 3 deletions

View File

@@ -636,6 +636,13 @@ exports.respond_to_message = function (opts) {
};
exports.reply_with_mention = function (opts) {
exports.respond_to_message(opts);
var message = current_msg_list.selected_message();
var mention = '@**' + message.sender_full_name + '**';
$('#new_message_content').val(mention + ' ');
};
// This function is for debugging / data collection only. Arguably it
// should live in debug.js, but then it wouldn't be able to call
// send_message() directly below.