Closed leonfs closed 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.
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.
@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.
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.
Expected behaviour: I've been playing with telegram bot. In the message schema defined in the documentation, I can see there is a
postback
property. When I try to access it is always undefined, but it should be set when replying to a command (for telegram bot when callback_query property exists in the response message object).What actually happens: It is not set.
Which bot engine (facebook, skype...): telegram
Link to a minimal, executable project that demonstrates the problem:
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
.Steps to install the project:
Steps to reproduce the problem: