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