1
0
mirror of synced 2024-11-21 20:46:05 +03:00

Merge pull request #47 from DmitryZagorulko/master

add comment attribute to file channel settings, originator and avatar url
This commit is contained in:
Alex Lushpai 2019-02-01 15:31:21 +03:00 committed by GitHub
commit 55dfc23bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View File

@ -187,6 +187,7 @@ func TestMgClient_TextMessages(t *testing.T) {
Type: MsgTypeText,
Text: "hello!",
},
Originator: "user",
User: User{
ExternalID: "6",
Nickname: "octopus",
@ -227,6 +228,7 @@ func TestMgClient_ImageMessages(t *testing.T) {
Type: MsgTypeImage,
Items: []Item{{ID: uploadFileResponse.ID}},
},
Originator: "user",
User: User{
ExternalID: "6",
Nickname: "octopus",

View File

@ -57,10 +57,11 @@ type MgClient struct {
// Channel type
type Channel struct {
ID uint64 `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Settings ChannelSettings `json:"settings,omitempty,brackets"`
ID uint64 `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
AvatarUrl string `json:"avatar_url,omitempty"`
Settings ChannelSettings `json:"settings,omitempty,brackets"`
}
// ChannelSettings struct
@ -105,11 +106,13 @@ type ChannelSettingsText struct {
// ChannelSettingsFilesBase struct
type ChannelSettingsFilesBase struct {
Creating string `json:"creating,omitempty"`
Editing string `json:"editing,omitempty"`
Quoting string `json:"quoting,omitempty"`
Deleting string `json:"deleting,omitempty"`
Max uint64 `json:"max_items_count,omitempty"`
Creating string `json:"creating,omitempty"`
Editing string `json:"editing,omitempty"`
Quoting string `json:"quoting,omitempty"`
Deleting string `json:"deleting,omitempty"`
Max uint64 `json:"max_items_count,omitempty"`
CommentAttribute string `json:"comment_attribute,omitempty"`
CommentMaxCharsCount int `json:"comment_max_chars_count,omitempty"`
}
// FullFileResponse uploaded file data
@ -230,6 +233,7 @@ type EditMessageRequestMessage struct {
// SendData struct
type SendData struct {
Message Message `json:"message"`
Originator string `json:"originator"`
User User `json:"user"`
Channel uint64 `json:"channel"`
ExternalChatID string `json:"external_chat_id"`