Add nil check in method '(*Update).FromChat', for type CallbackQuery.
OvyFlash olegshva4ko@gmail.com
Tue, 11 Jul 2023 12:04:24 +0300
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
types.go
→
types.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