all repos — telegram-bot-api @ c7a5e02799a8b7cf22fe2ffee845c34891d1e0d3

Golang bindings for the Telegram Bot API

Merge pull request #106 from MrYadro/chat_obj

New fields for Chat
Syfaro syfaro@foxpaw.in
Sun, 02 Jul 2017 15:42:14 -0500
commit

c7a5e02799a8b7cf22fe2ffee845c34891d1e0d3

parent

b57800c534f6b241f19dc6dfa17a585dcb216598

1 files changed, 16 insertions(+), 7 deletions(-)

jump to
M types.gotypes.go

@@ -81,15 +81,24 @@ ID int `json:"id"`

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. type Chat struct { - ID int64 `json:"id"` - Type string `json:"type"` - Title string `json:"title"` // optional - UserName string `json:"username"` // optional - FirstName string `json:"first_name"` // optional - LastName string `json:"last_name"` // optional - AllMembersAreAdmins bool `json:"all_members_are_administrators"` // optional + ID int64 `json:"id"` + Type string `json:"type"` + Title string `json:"title"` // optional + UserName string `json:"username"` // optional + FirstName string `json:"first_name"` // optional + LastName string `json:"last_name"` // 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.