#2289 Fix message translation on edit

This commit is contained in:
Cohee 2024-05-21 14:23:18 +03:00
parent 055defa204
commit c21deb3a8c
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
/**

View File

@ -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');
});