diff --git a/public/script.js b/public/script.js index f87db2ac6..febbc2204 100644 --- a/public/script.js +++ b/public/script.js @@ -6381,9 +6381,9 @@ async function messageEditDone(div) { appendMediaToMessage(mes, div.closest('.mes')); addCopyToCodeBlocks(div.closest('.mes')); + await eventSource.emit(event_types.MESSAGE_UPDATED, this_edit_mes_id); this_edit_mes_id = undefined; await saveChatConditional(); - await eventSource.emit(event_types.MESSAGE_UPDATED, this_edit_mes_id); } /** diff --git a/public/scripts/extensions/translate/index.js b/public/scripts/extensions/translate/index.js index 9bbfc1098..dbc8ab587 100644 --- a/public/scripts/extensions/translate/index.js +++ b/public/scripts/extensions/translate/index.js @@ -646,7 +646,7 @@ jQuery(() => { eventSource.makeFirst(event_types.USER_MESSAGE_RENDERED, handleOutgoingMessage); eventSource.on(event_types.MESSAGE_SWIPED, handleIncomingMessage); eventSource.on(event_types.IMPERSONATE_READY, handleImpersonateReady); - eventSource.on(event_types.MESSAGE_EDITED, handleMessageEdit); + eventSource.on(event_types.MESSAGE_UPDATED, handleMessageEdit); document.body.classList.add('translate'); });