"From" is not a pointer type in all but Message structs
svscorp opened this issue · 1 comments
svscorp commented
in gen_types.go
The struct Message has
From *User
json:"from,omitempty"``
However the struct CallbackQuery has
From User
json:"from"``
Is there a reason to not have "From" as a pointer type in CallbackQuery (and other than Message queries)?
PaulSonOfLars commented
Remember that the library is autogenerated from the docs. So if a field is a pointer, it's because it is optional, and may be empty.
CallbackQueries HAVE to be initiated by a user; someone pressed a button; so From
cannot be nil. See: https://core.telegram.org/bots/api#callbackquery