compose: Store raw_content after fetching it for quoting.

This is a nice performance optimization for the rare case where the
user does quote-and-reply on a message, aborts the compose, and then
re-does the quote-and-reply.
This commit is contained in:
Tim Abbott
2018-11-14 23:54:20 -08:00
parent f37e4df471
commit 86801d350a

View File

@@ -403,6 +403,7 @@ exports.quote_and_reply = function (opts) {
url: '/json/messages/' + message_id,
idempotent: true,
success: function (data) {
message.raw_content = data.raw_content;
compose_ui.replace_syntax('[Quoting…]', '```quote\n' + data.raw_content + '\n```', textarea);
$("#compose-textarea").trigger("autosize.resize");
},