diff options
author | 2021-05-15 11:58:11 +0200 | |
---|---|---|
committer | 2021-05-15 11:58:11 +0200 | |
commit | cc48294c31a76e94fa879ad0d8d5dbd7e94c651b (patch) | |
tree | 7c26d33b41bab33bbdfbba540958444f4c296602 /internal/api/model/attachment.go | |
parent | Mediahandler (#21) (diff) | |
download | gotosocial-cc48294c31a76e94fa879ad0d8d5dbd7e94c651b.tar.xz |
Inbox post (#22)
Inbox POST from federated servers now working for statuses and follow requests.
Follow request client API added.
Start work on federating outgoing messages.
Other fixes and changes/tidying up.
Diffstat (limited to 'internal/api/model/attachment.go')
-rw-r--r-- | internal/api/model/attachment.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/api/model/attachment.go b/internal/api/model/attachment.go index c5dbb0cba..ed53757eb 100644 --- a/internal/api/model/attachment.go +++ b/internal/api/model/attachment.go @@ -24,15 +24,15 @@ import "mime/multipart" // See: https://docs.joinmastodon.org/methods/statuses/media/ type AttachmentRequest struct { File *multipart.FileHeader `form:"file" binding:"required"` - Description string `form:"description" json:"description" xml:"description"` - Focus string `form:"focus" json:"focus" xml:"focus"` + Description string `form:"description"` + Focus string `form:"focus"` } -// AttachmentRequest represents the form data parameters submitted by a client during a media update/PUT request. +// AttachmentUpdateRequest represents the form data parameters submitted by a client during a media update/PUT request. // See: https://docs.joinmastodon.org/methods/statuses/media/ type AttachmentUpdateRequest struct { - Description *string `form:"description" json:"description" xml:"description"` - Focus *string `form:"focus" json:"focus" xml:"focus"` + Description *string `form:"description" json:"description" xml:"description"` + Focus *string `form:"focus" json:"focus" xml:"focus"` } // Attachment represents the object returned to a client after a successful media upload request. @@ -63,7 +63,7 @@ type Attachment struct { // See https://docs.joinmastodon.org/methods/statuses/media/#focal-points points for more. Meta MediaMeta `json:"meta,omitempty"` // Alternate text that describes what is in the media attachment, to be used for the visually impaired or when media attachments do not load. - Description string `json:"description"` + Description string `json:"description,omitempty"` // A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. // See https://github.com/woltapp/blurhash Blurhash string `json:"blurhash,omitempty"` |