aboutsummaryrefslogtreecommitdiff
path: root/models.go
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2019-08-09 17:52:33 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2019-08-09 17:52:48 +0300
commitb87e42f3294318244deae8126b3ac18d543fd3d7 (patch)
tree2b4fe1f84b07ddf80a6cb863c385293c5d2c4496 /models.go
parenta8ca31679d01ddfe461cadb994131986639b4ea1 (diff)
fix uploadsv0.2.0
Diffstat (limited to 'models.go')
-rw-r--r--models.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/models.go b/models.go
index 5a6f02a..7dc79e1 100644
--- a/models.go
+++ b/models.go
@@ -434,9 +434,9 @@ type PhotoAttachmentRequestAllOf struct {
// Request to attach image. All fields are mutually exclusive
type PhotoAttachmentRequestPayload struct {
- Url string `json:"url,omitempty"` // Any external image URL you want to attach
- Token string `json:"token,omitempty"` // Token of any existing attachment
- Photos *map[string]PhotoToken `json:"photos,omitempty"` // Tokens were obtained after uploading images
+ Url string `json:"url,omitempty"` // Any external image URL you want to attach
+ Token string `json:"token,omitempty"` // Token of any existing attachment
+ Photos map[string]PhotoToken `json:"photos,omitempty"` // Tokens were obtained after uploading images
}
type PhotoToken struct {
@@ -559,7 +559,8 @@ const (
// This is information you will receive as soon as audio/video is uploaded
type UploadedInfo struct {
- Token string `json:"token,omitempty"` // Token is unique uploaded media identfier
+ FileID int `json:"file_id,omitempty"`
+ Token string `json:"token,omitempty"` // Token is unique uploaded media identfier
}
type User struct {
@@ -606,7 +607,7 @@ func (u Update) GetUpdateType() UpdateType {
}
func (u Update) GetUpdateTime() time.Time {
- return time.Unix(int64(u.Timestamp), 0)
+ return time.Unix(int64(u.Timestamp/1000), 0)
}
type UpdateInterface interface {