Emit message_updated on edit cancel
| @@ -10151,7 +10151,7 @@ jQuery(async function () { | |||
| 10151 | } | 10151 | } |
| 10152 | }); | 10152 | }); |
| 10153 | 10153 | ||
| 10154 | $(document).on('click', '.mes_edit_cancel', function () { | 10154 | $(document).on('click', '.mes_edit_cancel', async function () { |
| 10155 | let text = chat[this_edit_mes_id]['mes']; | 10155 | let text = chat[this_edit_mes_id]['mes']; |
| 10156 | 10156 | ||
| 10157 | $(this).closest('.mes_block').find('.mes_text').empty(); | 10157 | $(this).closest('.mes_block').find('.mes_text').empty(); |
| @@ -10169,6 +10169,8 @@ jQuery(async function () { | |||
| 10169 | )); | 10169 | )); |
| 10170 | appendMediaToMessage(chat[this_edit_mes_id], $(this).closest('.mes')); | 10170 | appendMediaToMessage(chat[this_edit_mes_id], $(this).closest('.mes')); |
| 10171 | addCopyToCodeBlocks($(this).closest('.mes')); | 10171 | addCopyToCodeBlocks($(this).closest('.mes')); |
| 10172 | |||
| 10173 | await eventSource.emit(event_types.MESSAGE_UPDATED, this_edit_mes_id); | ||
| 10172 | this_edit_mes_id = undefined; | 10174 | this_edit_mes_id = undefined; |
| 10173 | }); | 10175 | }); |
| 10174 | 10176 | ||