1
0
mirror of synced 2024-11-22 13:06: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, Type: MsgTypeText,
Text: "hello!", Text: "hello!",
}, },
Originator: "user",
User: User{ User: User{
ExternalID: "6", ExternalID: "6",
Nickname: "octopus", Nickname: "octopus",
@ -227,6 +228,7 @@ func TestMgClient_ImageMessages(t *testing.T) {
Type: MsgTypeImage, Type: MsgTypeImage,
Items: []Item{{ID: uploadFileResponse.ID}}, Items: []Item{{ID: uploadFileResponse.ID}},
}, },
Originator: "user",
User: User{ User: User{
ExternalID: "6", ExternalID: "6",
Nickname: "octopus", Nickname: "octopus",

View File

@ -60,6 +60,7 @@ type Channel struct {
ID uint64 `json:"id,omitempty"` ID uint64 `json:"id,omitempty"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
AvatarUrl string `json:"avatar_url,omitempty"`
Settings ChannelSettings `json:"settings,omitempty,brackets"` Settings ChannelSettings `json:"settings,omitempty,brackets"`
} }
@ -110,6 +111,8 @@ type ChannelSettingsFilesBase struct {
Quoting string `json:"quoting,omitempty"` Quoting string `json:"quoting,omitempty"`
Deleting string `json:"deleting,omitempty"` Deleting string `json:"deleting,omitempty"`
Max uint64 `json:"max_items_count,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 // FullFileResponse uploaded file data
@ -230,6 +233,7 @@ type EditMessageRequestMessage struct {
// SendData struct // SendData struct
type SendData struct { type SendData struct {
Message Message `json:"message"` Message Message `json:"message"`
Originator string `json:"originator"`
User User `json:"user"` User User `json:"user"`
Channel uint64 `json:"channel"` Channel uint64 `json:"channel"`
ExternalChatID string `json:"external_chat_id"` ExternalChatID string `json:"external_chat_id"`