Merge pull request #106 from MrYadro/chat_obj

New fields for Chat
bot-api-6.1
Syfaro 2017-07-02 15:42:14 -05:00 committed by GitHub
commit c7a5e02799
1 changed files with 16 additions and 7 deletions

View File

@ -81,6 +81,12 @@ type GroupChat struct {
Title string `json:"title"` Title string `json:"title"`
} }
// ChatPhoto represents a chat photo.
type ChatPhoto struct {
SmallFileID string `json:"small_file_id"`
BigFileID string `json:"big_file_id"`
}
// Chat contains information about the place a message was sent. // Chat contains information about the place a message was sent.
type Chat struct { type Chat struct {
ID int64 `json:"id"` ID int64 `json:"id"`
@ -90,6 +96,9 @@ type Chat struct {
FirstName string `json:"first_name"` // optional FirstName string `json:"first_name"` // optional
LastName string `json:"last_name"` // optional LastName string `json:"last_name"` // optional
AllMembersAreAdmins bool `json:"all_members_are_administrators"` // optional AllMembersAreAdmins bool `json:"all_members_are_administrators"` // optional
Photo *ChatPhoto `json:"photo"`
Description string `json:"description,omitempty"` // optional
InviteLink string `json:"invite_link,omitempty"` // optional
} }
// IsPrivate returns if the Chat is a private conversation. // IsPrivate returns if the Chat is a private conversation.