mirror of
https://github.com/tucnak/telebot
synced 2024-11-05 06:00:58 +00:00
commit
346b6bfe9d
4
admin.go
4
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"`
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user