Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6d42a230d1 | |||
7166300503 |
@ -82,6 +82,7 @@ func (c *Client) IndexDirectMessages(ctx context.Context, otherUserID string, re
|
|||||||
query.Add("since_id", req.SinceID.String())
|
query.Add("since_id", req.SinceID.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
httpReq.URL.RawQuery = query.Encode()
|
||||||
|
|
||||||
var resp IndexDirectMessagesResponse
|
var resp IndexDirectMessagesResponse
|
||||||
err = c.doWithAuthToken(ctx, httpReq, &resp)
|
err = c.doWithAuthToken(ctx, httpReq, &resp)
|
||||||
@ -127,7 +128,7 @@ func (c *Client) CreateDirectMessage(ctx context.Context, m *Message) (*Message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
var resp struct {
|
var resp struct {
|
||||||
*Message `json:"message"`
|
*Message `json:"direct_message"`
|
||||||
}
|
}
|
||||||
err = c.doWithAuthToken(ctx, httpReq, &resp)
|
err = c.doWithAuthToken(ctx, httpReq, &resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
3
json.go
3
json.go
@ -150,11 +150,14 @@ type Attachment struct {
|
|||||||
Loci [][]int `json:"loci,omitempty"`
|
Loci [][]int `json:"loci,omitempty"`
|
||||||
UserIDs []ID `json:"user_ids,omitempty"`
|
UserIDs []ID `json:"user_ids,omitempty"`
|
||||||
URL string `json:"url,omitempty"`
|
URL string `json:"url,omitempty"`
|
||||||
|
FileID string `json:"file_id,omitempty"`
|
||||||
|
VideoPreviewURL string `json:"preview_url,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Latitude string `json:"lat,omitempty"`
|
Latitude string `json:"lat,omitempty"`
|
||||||
Longitude string `json:"lng,omitempty"`
|
Longitude string `json:"lng,omitempty"`
|
||||||
Placeholder string `json:"placeholder,omitempty"`
|
Placeholder string `json:"placeholder,omitempty"`
|
||||||
Charmap [][]int `json:"charmap,omitempty"`
|
Charmap [][]int `json:"charmap,omitempty"`
|
||||||
|
ReplyID ID `json:"reply_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Attachment) String() string {
|
func (a *Attachment) String() string {
|
||||||
|
Reference in New Issue
Block a user