Skip to content

Commit a81f2ab

Browse files
committed
fix(chatwoot): support CSAT messages in webhook processing
- Add support for 'input_csat' content_type in MessageHandler - Previously CSAT messages were being ignored due to strict content_type check - CSAT messages now processed as text messages and sent to WhatsApp - Fixes issue where Chatwoot CSAT surveys were not being delivered to users Changes: - Modified content_type validation in message_created.ts to accept both 'text' and 'input_csat' - CSAT messages will now be sent to WhatsApp with their survey content and links - Maintains existing behavior for all other message types
1 parent 8fbf7fa commit a81f2ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/apps/chatwoot/consumers/inbox/message_created.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class MessageHandler {
8080
async handle(body: any) {
8181
const chatId = await LookupAndCheckChatId(this.session, body);
8282
const message = body;
83-
if (message.content_type != 'text') {
83+
if (message.content_type != 'text' && message.content_type != 'input_csat') {
8484
this.logger.info(
8585
`Message content type not supported. Content type: ${message.content_type}`,
8686
);

0 commit comments

Comments
 (0)