Add nil check in method '(*Update).FromChat', for type CallbackQuery.
parent
3c3091bd33
commit
dcd469ffa5
2
types.go
2
types.go
|
@ -158,7 +158,7 @@ func (u *Update) FromChat() *Chat {
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue