diff --git a/admin.go b/admin.go index da3f93e..f33aace 100644 --- a/admin.go +++ b/admin.go @@ -37,10 +37,10 @@ func (c *ChatInviteLink) ExpireDate() time.Time { // ChatMemberUpdated object represents changes in the status of a chat member. type ChatMemberUpdated struct { // Chat where the user belongs to. - Chat Chat `json:"chat"` + Chat *Chat `json:"chat"` // From which user the action was triggered. - From User `json:"from"` + From *User `json:"from"` // Unixtime, use ChatMemberUpdated.Time() to get time.Time Unixtime int64 `json:"date"` diff --git a/context.go b/context.go index 9f0ce87..fb533ea 100644 --- a/context.go +++ b/context.go @@ -240,6 +240,10 @@ func (c *nativeContext) Chat() *Chat { return c.message.Chat case c.callback != nil && c.callback.Message != nil: return c.callback.Message.Chat + case c.myChatMember != nil: + return c.myChatMember.Chat + case c.chatMember != nil: + return c.chatMember.Chat default: return nil }