botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
71 stars 83 forks source link

[FEATURE] Messenger Channel - support "Account Linking" #988

Closed maksym-plotnikov closed 1 year ago

maksym-plotnikov commented 4 years ago

Problem: Currently I'm working on implementation of Facebook Messenger Account Linking - Account Linking Overview. We implemented all needed functionality on both sides (Bot and 3rd-party API) and configure account_linking webhook. Everything works but I didn't get response from Facebook at Botpress webhook. I've started to investigate and found out that inside botpress/modules/channel-messenger/src/backend/messenger.ts -> _handleIncomingMessage method You handle only 2 basic cases - message and postback. But there are lot of other webhook events inside Messenger API and they could have no nor message either postback keys. For example Account Linking Webhook event has another structure: Docs. So currently I did a "monkey-patch" of "messenger-module' inside /modules/.cache with next code: ... } else if (webhookEvent.account_linking) { await this._sendEvent(bot.botId, senderId, webhookEvent.account_linking, { type: 'account_linking }); } ... Possible solution Best case: Add support for all webhook events and pass them inside middleware / dialog engines: Webhooks Reference - List of Webhook Events Minimum case: Add support for Account Linking Webhook

Proposal If You guys have low capacity or another priorities right now - please let me know here. I will try to do a PR :-)

P.S. I'm with You since "botpress": "1.x" and really appreciated for all hard work You did @slvnperron and the team!

maksym-plotnikov commented 4 years ago

@EFF @slvnperron Maybe You guys can find a minute to check this issue?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

davidvitora commented 1 year ago

Not relevant on 12.30.x