Skip to content

Commit

Permalink
Merge pull request #759 from ozzyoss77/main
Browse files Browse the repository at this point in the history
Update server.js fixing message.type 'interactive'
  • Loading branch information
leifermendez authored Jun 8, 2023
2 parents bc10b3e + dc78ffb commit 07c2323
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/provider/src/meta/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ class MetaWebHookServer extends EventEmitter {
}
this.emit('message', responseObj)
}

if (message.type === 'interactive') {
const body = message.interactive?.button_reply?.title || message.interactive?.list_reply?.id;
const title_list_reply = message.interactive?.list_reply?.title;
const responseObj = {
type: 'interactive',
from: message.from,
to,
body,
title_list_reply,
}
this.emit('message', responseObj);
}

if (message.type === 'image') {
const body = generateRefprovider('_event_image_')
Expand Down

0 comments on commit 07c2323

Please sign in to comment.