Emit event on message swipe deletion (#4590) Closes #4567
Signed| @@ -7977,6 +7977,8 @@ export async function deleteSwipe(swipeId = null) { | ||
| 7977 | 7977 | const newSwipeId = Math.min(swipeId, lastMessage.swipes.length - 1); |
| 7978 | 7978 | syncSwipeToMes(null, newSwipeId); |
| 7979 | 7979 | |
| 7980 | + await eventSource.emit(event_types.MESSAGE_SWIPE_DELETED, { swipeId, newSwipeId }); | |
| 7981 | + | |
| 7980 | 7982 | await saveChatConditional(); |
| 7981 | 7983 | await reloadCurrentChat(); |
| 7982 | 7984 | |
| @@ -12,6 +12,7 @@ export const event_types = { | ||
| 12 | 12 | MESSAGE_FILE_EMBEDDED: 'message_file_embedded', |
| 13 | 13 | MESSAGE_REASONING_EDITED: 'message_reasoning_edited', |
| 14 | 14 | MESSAGE_REASONING_DELETED: 'message_reasoning_deleted', |
| 15 | + MESSAGE_SWIPE_DELETED: 'message_swipe_deleted', | |
| 15 | 16 | MORE_MESSAGES_LOADED: 'more_messages_loaded', |
| 16 | 17 | IMPERSONATE_READY: 'impersonate_ready', |
| 17 | 18 | CHAT_CHANGED: 'chat_id_changed', |