all repos — telegram-bot-api @ dcd469ffa55d2df26d583b5474bf54cbc4ca2f06

Golang bindings for the Telegram Bot API

Add nil check in method '(*Update).FromChat', for type CallbackQuery.
OvyFlash olegshva4ko@gmail.com
Tue, 11 Jul 2023 12:04:24 +0300
commit

dcd469ffa55d2df26d583b5474bf54cbc4ca2f06

parent

3c3091bd335dfbc9377f5dfca116dc6f3aab6ec7

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M types.gotypes.go

@@ -158,7 +158,7 @@ case u.ChannelPost != nil:

return u.ChannelPost.Chat case u.EditedChannelPost != nil: return u.EditedChannelPost.Chat - case u.CallbackQuery != nil: + case u.CallbackQuery != nil && u.CallbackQuery.Message != nil: return u.CallbackQuery.Message.Chat default: return nil