From 87ba75275808e7a145e490cf08684a155febf845 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Sat, 2 Jun 2018 11:38:40 +0000 Subject: [PATCH] refactor: Extract compose.do_post_send_tasks(). --- static/js/compose.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/compose.js b/static/js/compose.js index bff629690f..3876ea4338 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -309,11 +309,15 @@ exports.finish = function () { } else { exports.send_message(); } + exports.do_post_send_tasks(); + return true; +}; + +exports.do_post_send_tasks = function () { exports.clear_preview_area(); // TODO: Do we want to fire the event even if the send failed due // to a server-side error? $(document).trigger($.Event('compose_finished.zulip')); - return true; }; exports.update_email = function (user_id, new_email) {