From 0c8884bcba9ddda06117b0f91853cc833cc6455e Mon Sep 17 00:00:00 2001 From: MrYadro Date: Fri, 30 Jun 2017 20:29:59 +0700 Subject: [PATCH 1/2] new fields for Chat --- types.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types.go b/types.go index 10aa312..cc0e171 100644 --- a/types.go +++ b/types.go @@ -81,6 +81,12 @@ type GroupChat struct { 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"` @@ -90,6 +96,8 @@ type Chat struct { FirstName string `json:"first_name"` // optional LastName string `json:"last_name"` // optional AllMembersAreAdmins bool `json:"all_members_are_administrators"` // optional + Description string `json:"description,omitempty"` // optional + InviteLink string `json:"invite_link,omitempty"` } // IsPrivate returns if the Chat is a private conversation. From 32f5ed843320de1232590ca007db71a5db20e3cb Mon Sep 17 00:00:00 2001 From: MrYadro Date: Fri, 30 Jun 2017 20:31:54 +0700 Subject: [PATCH 2/2] new fields for Chat p2 --- types.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/types.go b/types.go index cc0e171..4c0a6e2 100644 --- a/types.go +++ b/types.go @@ -89,15 +89,16 @@ type ChatPhoto struct { // 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 - Description string `json:"description,omitempty"` // optional - InviteLink string `json:"invite_link,omitempty"` + 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.