Skip to content

Commit

Permalink
BREAKING CHANGE: add MessagesChatPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud committed Jul 29, 2020
1 parent 9bb408e commit b3006a0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 34 deletions.
2 changes: 1 addition & 1 deletion api/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (vk *VK) MessagesGetChatChatIDs(params Params) (response MessagesGetChatCha

// MessagesGetChatPreviewResponse struct.
type MessagesGetChatPreviewResponse struct {
Preview object.MessagesChat `json:"preview"`
Preview object.MessagesChatPreview `json:"preview"`
object.ExtendedResponse
}

Expand Down
55 changes: 22 additions & 33 deletions object/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,39 +303,28 @@ type MessagesTemplateElementCarouselAction struct {

// MessagesChat struct.
type MessagesChat struct {
AdminID int `json:"admin_id"` // Chat creator ID
ID int `json:"id"` // Chat ID
Kicked BaseBoolInt `json:"kicked"` // Shows that user has been kicked from the chat
Left BaseBoolInt `json:"left"` // Shows that user has been left the chat
Joined BaseBoolInt `json:"joined"`
IsDefaultPhoto BaseBoolInt `json:"is_default_photo"`
Photo100 string `json:"photo_100"` // URL of the preview image with 100 px in width
Photo200 string `json:"photo_200"` // URL of the preview image with 200 px in width
Photo50 string `json:"photo_50"` // URL of the preview image with 50 px in width
PushSettings MessagesChatPushSettings `json:"push_settings"`
Title string `json:"title"` // Chat title
Type string `json:"type"` // Chat type
Users []int `json:"users"`
MembersCount int `json:"members_count"`
Members []int `json:"members"`
Photo MessagesChatSettingsPhoto `json:"photo"`
LocalID int `json:"local_id"`
ChatSettings MessagesConversationChatSettings `json:"chat_settings"`
}

// MessagesChatFull struct.
type MessagesChatFull struct {
AdminID int `json:"admin_id"` // Chat creator ID
ID int `json:"id"` // Chat ID
Kicked BaseBoolInt `json:"kicked"` // Shows that user has been kicked from the chat
Left BaseBoolInt `json:"left"` // Shows that user has been left the chat
Photo100 string `json:"photo_100"` // URL of the preview image with 100 px in width
Photo200 string `json:"photo_200"` // URL of the preview image with 200 px in width
Photo50 string `json:"photo_50"` // URL of the preview image with 50 px in width
PushSettings MessagesChatPushSettings `json:"push_settings"`
Title string `json:"title"` // Chat title
Type string `json:"type"` // Chat type
Users []MessagesUserXtrInvitedBy `json:"users"`
AdminID int `json:"admin_id"` // Chat creator ID
ID int `json:"id"` // Chat ID
IsDefaultPhoto BaseBoolInt `json:"is_default_photo"`
Photo100 string `json:"photo_100"` // URL of the preview image with 100 px in width
Photo200 string `json:"photo_200"` // URL of the preview image with 200 px in width
Photo50 string `json:"photo_50"` // URL of the preview image with 50 px in width
Title string `json:"title"` // Chat title
Type string `json:"type"` // Chat type
Users []int `json:"users"`
MembersCount int `json:"members_count"`
}

// MessagesChatPreview struct.
type MessagesChatPreview struct {
AdminID int `json:"admin_id"`
MembersCount int `json:"members_count"`
Members []int `json:"members"`
Title string `json:"title"`
Photo MessagesChatSettingsPhoto `json:"photo"`
LocalID int `json:"local_id"`
Joined bool `json:"joined"`
ChatSettings MessagesConversationChatSettings `json:"chat_settings"`
}

// MessagesChatPushSettings struct.
Expand Down

0 comments on commit b3006a0

Please sign in to comment.