diff --git a/v1/client_test.go b/v1/client_test.go index adb7248..7f102d1 100644 --- a/v1/client_test.go +++ b/v1/client_test.go @@ -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", diff --git a/v1/types.go b/v1/types.go index 99c9f95..2ca2309 100644 --- a/v1/types.go +++ b/v1/types.go @@ -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"`