From 675f9076a4cb7f28d848390c15a22bcaa3bca62f Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 1 Sep 2024 21:19:56 +0300 Subject: [PATCH] Emit message_updated on edit cancel --- public/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index 554b5850e..57aa7643f 100644 --- a/public/script.js +++ b/public/script.js @@ -10151,7 +10151,7 @@ jQuery(async function () { } }); - $(document).on('click', '.mes_edit_cancel', function () { + $(document).on('click', '.mes_edit_cancel', async function () { let text = chat[this_edit_mes_id]['mes']; $(this).closest('.mes_block').find('.mes_text').empty(); @@ -10169,6 +10169,8 @@ jQuery(async function () { )); appendMediaToMessage(chat[this_edit_mes_id], $(this).closest('.mes')); addCopyToCodeBlocks($(this).closest('.mes')); + + await eventSource.emit(event_types.MESSAGE_UPDATED, this_edit_mes_id); this_edit_mes_id = undefined; });