quotation from transport to mg
This commit is contained in:
parent
619f407935
commit
bd7b959455
@ -98,7 +98,7 @@ func TestMgClient_Messages(t *testing.T) {
|
|||||||
t.Logf("%v", ext)
|
t.Logf("%v", ext)
|
||||||
|
|
||||||
snd := SendData{
|
snd := SendData{
|
||||||
SendMessage{
|
Message: SendMessage{
|
||||||
Message{
|
Message{
|
||||||
ExternalID: ext,
|
ExternalID: ext,
|
||||||
Type: "text",
|
Type: "text",
|
||||||
@ -106,13 +106,13 @@ func TestMgClient_Messages(t *testing.T) {
|
|||||||
},
|
},
|
||||||
time.Now(),
|
time.Now(),
|
||||||
},
|
},
|
||||||
User{
|
User: User{
|
||||||
ExternalID: "6",
|
ExternalID: "6",
|
||||||
Nickname: "octopus",
|
Nickname: "octopus",
|
||||||
Firstname: "Joe",
|
Firstname: "Joe",
|
||||||
},
|
},
|
||||||
channelId,
|
Channel: channelId,
|
||||||
"24798237492374",
|
ExternalChatID: "24798237492374",
|
||||||
}
|
}
|
||||||
|
|
||||||
data, status, err := c.Messages(snd)
|
data, status, err := c.Messages(snd)
|
||||||
|
13
v1/types.go
13
v1/types.go
@ -72,10 +72,15 @@ type UpdateMessage struct {
|
|||||||
|
|
||||||
// SendData struct
|
// SendData struct
|
||||||
type SendData struct {
|
type SendData struct {
|
||||||
Message SendMessage `url:"message" json:"message"`
|
Message SendMessage `url:"message" json:"message"`
|
||||||
User User `url:"user" json:"user"`
|
User User `url:"user" json:"user"`
|
||||||
Channel uint64 `url:"channel" json:"channel"`
|
Channel uint64 `url:"channel" json:"channel"`
|
||||||
ExternalChatID string `url:"external_chat_id" json:"external_chat_id"`
|
ExternalChatID string `url:"external_chat_id" json:"external_chat_id"`
|
||||||
|
Quote *SendMessageRequestQuote `url:"quote,omitempty" json:"quote,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SendMessageRequestQuote struct {
|
||||||
|
ExternalID string `json:"external_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateData struct
|
// UpdateData struct
|
||||||
|
Loading…
Reference in New Issue
Block a user