From 56de833e18785759f9568bfefa572d1484e68656 Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Fri, 17 Jan 2025 18:11:13 +0100 Subject: [PATCH] fix: attempt to fix the issue --- index.channel.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.channel.ts b/index.channel.ts index 16960b2..27f72f8 100644 --- a/index.channel.ts +++ b/index.channel.ts @@ -633,6 +633,17 @@ export class SlackHandler extends ChannelHandler { this.logger.error('Unable to send attachment', result.error); throw new Error('Unable to send attachment'); } + + // Trigger sent message event + const sentMessage: MessageCreateDto = { + mid: response && 'mid' in response ? response.mid : '', + message: envelope.message, + recipient: recipient.id, + handover: !!(options && options.assignTo), + read: false, + delivery: false, + }; + this.eventEmitter.emit('hook:chatbot:sent', sentMessage, event); } if (message) {