diff --git a/v1/client.go b/v1/client.go index 8503371..a130afa 100644 --- a/v1/client.go +++ b/v1/client.go @@ -361,7 +361,7 @@ func (c *MgClient) DialogClose(request uint64) (map[string]interface{}, int, err // // var client = v1.New("https://demo.url", "09jIJ") // -// data, status, err := client.Messages(MessagesRequest{ManagerID:5}) +// data, status, err := client.Messages(MessagesRequest{UserID:5}) // // if err != nil { // fmt.Printf("%v", err) diff --git a/v1/client_test.go b/v1/client_test.go index 6781cbd..9f9af5a 100644 --- a/v1/client_test.go +++ b/v1/client_test.go @@ -157,7 +157,7 @@ func TestMgClient_DialogAssign(t *testing.T) { c := client() i, err := strconv.ParseUint(os.Getenv("MG_BOT_DIALOG"), 10, 64) m, err := strconv.ParseUint(os.Getenv("MG_BOT_USER"), 10, 64) - req := DialogAssignRequest{DialogID: i, ManagerID: m} + req := DialogAssignRequest{DialogID: i, UserID: m} _, status, err := c.DialogAssign(req) diff --git a/v1/types.go b/v1/types.go index 97fec24..4f8899b 100644 --- a/v1/types.go +++ b/v1/types.go @@ -110,27 +110,27 @@ type ( } DialogsRequest struct { - ID uint64 `url:"id,omitempty"` - ChatID string `url:"chat_id,omitempty" json:"chat_id"` - ManagerID string `url:"manager_id,omitempty" json:"manager_id"` - BotID string `url:"bot_id,omitempty" json:"bot_id"` - Assign uint8 `url:"assign,omitempty"` - Active uint8 `url:"active,omitempty"` - Since string `url:"since,omitempty"` - Until string `url:"until,omitempty"` + ID uint64 `url:"id,omitempty"` + ChatID string `url:"chat_id,omitempty" json:"chat_id"` + UserID string `url:"user_id,omitempty" json:"user_id"` + BotID string `url:"bot_id,omitempty" json:"bot_id"` + Assign uint8 `url:"assign,omitempty"` + Active uint8 `url:"active,omitempty"` + Since string `url:"since,omitempty"` + Until string `url:"until,omitempty"` } DialogAssignRequest struct { - DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"` - ManagerID uint64 `url:"manager_id,omitempty" json:"manager_id"` - BotID uint64 `url:"bot_id,omitempty" json:"bot_id"` + DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"` + UserID uint64 `url:"user_id,omitempty" json:"user_id"` + BotID uint64 `url:"bot_id,omitempty" json:"bot_id"` } MessagesRequest struct { ID uint64 `url:"id,omitempty"` ChatID uint64 `url:"chat_id,omitempty" json:"chat_id"` DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"` - ManagerID uint64 `url:"manager_id,omitempty" json:"manager_id"` + UserID uint64 `url:"user_id,omitempty" json:"user_id"` CustomerID uint64 `url:"customer_id,omitempty" json:"customer_id"` BotID uint64 `url:"bot_id,omitempty" json:"bot_id"` ChannelID uint64 `url:"channel_id,omitempty" json:"channel_id"` @@ -274,7 +274,7 @@ type ( DialogAssignResponse struct { Responsible Responsible `json:"responsible"` PreviousResponsible Responsible `json:"previous_responsible,omitempty"` - LeftManagerID uint64 `json:"left_manager_id,omitempty"` + LeftUserID uint64 `json:"left_user_id,omitempty"` IsReAssign bool `json:"is_reassign"` }