-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
callback: add missing struct fields #647
Conversation
callback.go
Outdated
@@ -26,6 +26,15 @@ type Callback struct { | |||
// a bad client can send arbitrary data in this field. | |||
Data string `json:"data"` | |||
|
|||
// Global identifier, uniquely corresponding to the chat to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the documentation:
// Global identifier, uniquely corresponding to the chat to | |
// ChatInstance is a global identifier, uniquely corresponding to the chat to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
callback.go
Outdated
// which the message with the callback button was sent. | ||
ChatInstance string `json:"chat_instance"` | ||
|
||
// Unique identifier of the game for which a URL is requested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Good catch, thank you for filling the hole in our API. |
The telegram Bot API includes
chat_instance
andgame_short_name
in its CallbackQuery object. Particularly, thegame_short_name
is currently missing in theCallback
object of the update when a user requests a game's url from the bot and it's also not deserialized in theGame
object of the callback's message.I think it might be nice to have the Callback struct conforming with Telegram's CallbackQuery object and also a lot easier to implement than somehow populating the Game struct in the message.