dashbot - 9.9.0
botkit - 0.6.12
In Dashbot, there are 3+ [Unsupported Message Type] message appearing for each message sent to user. Botkit is configured to receive delivery messages (see below)
let
controller = Botkit.facebookbot({
access_token: FACEBOOK.pageAccessToken,
verify_token: FACEBOOK.validationToken,
app_secret: FACEBOOK.appSecret,
validate_requests: FACEBOOK.validateRequests,
require_delivery: true,
receive_via_postback: true // postback payload returned in message_received
}),
bot = controller.spawn({})
;
The JSON for the messages in Dashbot are:
{
"type": "message_delivered"
}
// and
{
"type": "message_read"
}
Suggested Fixes:
- Dashbot API should ignore these message types
- Update the code to skip sending for these message types (maybe in
logIncomingInternal)
|
function logIncomingInternal(data, source, type) { |
)
- Update documentation to show users how to do it
controller.middleware.receive.use((bot, message, next) => {
if (message && !['message_read','message_delivered'].includes(message.type)) {
dashbot.send(bot, message, next);
}
});
dashbot -
9.9.0botkit -
0.6.12In Dashbot, there are 3+
[Unsupported Message Type]message appearing for each message sent to user. Botkit is configured to receive delivery messages (see below)The JSON for the messages in Dashbot are:
Suggested Fixes:
logIncomingInternal)dashbot/src/dashbot-facebook.js
Line 12 in 5961822