1
0
mirror of synced 2024-11-22 04:56:06 +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

@ -60,6 +60,7 @@ type Channel struct {
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"`
}
@ -110,6 +111,8 @@ type ChannelSettingsFilesBase struct {
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"`