claudiajs / claudia-bot-builder

Create chat bots for Facebook Messenger, Slack, Amazon Alexa, Skype, Telegram, Viber, Line, GroupMe, Kik and Twilio and deploy to AWS Lambda in minutes
https://claudiajs.com/claudia-bot-builder.html
MIT License
1.84k stars 253 forks source link

Missing postback property on Telegram Bot #124

Closed leonfs closed 5 years ago

leonfs commented 5 years ago

Please use GitHub issues only to report bugs. To ask a general question or request assistance/support, please use the Claudia.js Gitter Chat instead.

To report a bug or a problem, please fill in the sections below. The more you provide, the better we'll be able to help.


https://github.com/claudiajs/claudia-bot-builder/blob/master/lib/telegram/parse.js#L32

As I understand it, the line below should include a property postback: true.

stojanovic commented 5 years ago

postback property was originally used by Facebook only, to detect the button click. I think we added it for Slack too, but I don't think we can add it for Telegram, as it doesn't tell us if something was a button click or typed text.

If Telegram updated its API to return that info feel free to send PR to fix it, otherwise I don't think we can have postback info for that platform.

leonfs commented 5 years ago

Hey @stojanovic - Thanks for your reply.

I'm not an expert on the subject. Though reading at the docs, it does feel like callback_query property acts like the postback property.

https://core.telegram.org/bots/api#callbackquery

stojanovic commented 5 years ago

@leonfs thanks, it might be useful. Do you want to try to send PR for this? If not, I'll do my best to take a look at it.