Merge pull request #18 from blide/master

Manager -> User
This commit is contained in:
Alex Lushpai 2018-09-18 16:19:33 +03:00 committed by GitHub
commit c723bc0e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -361,7 +361,7 @@ func (c *MgClient) DialogClose(request uint64) (map[string]interface{}, int, err
// //
// var client = v1.New("https://demo.url", "09jIJ") // 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 { // if err != nil {
// fmt.Printf("%v", err) // fmt.Printf("%v", err)

View File

@ -157,7 +157,7 @@ func TestMgClient_DialogAssign(t *testing.T) {
c := client() c := client()
i, err := strconv.ParseUint(os.Getenv("MG_BOT_DIALOG"), 10, 64) i, err := strconv.ParseUint(os.Getenv("MG_BOT_DIALOG"), 10, 64)
m, err := strconv.ParseUint(os.Getenv("MG_BOT_USER"), 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) _, status, err := c.DialogAssign(req)

View File

@ -112,7 +112,7 @@ type (
DialogsRequest struct { DialogsRequest struct {
ID uint64 `url:"id,omitempty"` ID uint64 `url:"id,omitempty"`
ChatID string `url:"chat_id,omitempty" json:"chat_id"` ChatID string `url:"chat_id,omitempty" json:"chat_id"`
ManagerID string `url:"manager_id,omitempty" json:"manager_id"` UserID string `url:"user_id,omitempty" json:"user_id"`
BotID string `url:"bot_id,omitempty" json:"bot_id"` BotID string `url:"bot_id,omitempty" json:"bot_id"`
Assign uint8 `url:"assign,omitempty"` Assign uint8 `url:"assign,omitempty"`
Active uint8 `url:"active,omitempty"` Active uint8 `url:"active,omitempty"`
@ -122,7 +122,7 @@ type (
DialogAssignRequest struct { DialogAssignRequest struct {
DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_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"`
BotID uint64 `url:"bot_id,omitempty" json:"bot_id"` BotID uint64 `url:"bot_id,omitempty" json:"bot_id"`
} }
@ -130,7 +130,7 @@ type (
ID uint64 `url:"id,omitempty"` ID uint64 `url:"id,omitempty"`
ChatID uint64 `url:"chat_id,omitempty" json:"chat_id"` ChatID uint64 `url:"chat_id,omitempty" json:"chat_id"`
DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_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"` CustomerID uint64 `url:"customer_id,omitempty" json:"customer_id"`
BotID uint64 `url:"bot_id,omitempty" json:"bot_id"` BotID uint64 `url:"bot_id,omitempty" json:"bot_id"`
ChannelID uint64 `url:"channel_id,omitempty" json:"channel_id"` ChannelID uint64 `url:"channel_id,omitempty" json:"channel_id"`
@ -274,7 +274,7 @@ type (
DialogAssignResponse struct { DialogAssignResponse struct {
Responsible Responsible `json:"responsible"` Responsible Responsible `json:"responsible"`
PreviousResponsible Responsible `json:"previous_responsible,omitempty"` 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"` IsReAssign bool `json:"is_reassign"`
} }