summaryrefslogtreecommitdiff
path: root/internal/api/model/attachment.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-10 19:29:26 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-10 19:29:26 +0100
commitba9d6b467a1f03447789844048d913738c843569 (patch)
tree5a464ee4a33f26e3284179582ab6d3332d9d5388 /internal/api/model/attachment.go
parent[chore/bugfix/horror] Allow `expires_in` and poll choices to be parsed from s... (diff)
downloadgotosocial-ba9d6b467a1f03447789844048d913738c843569.tar.xz
[feature] Media attachment placeholders (#2331)
* [feature] Use placeholders for unknown media types * fix read of underreported small files * switch to reduce nesting * simplify cleanup
Diffstat (limited to 'internal/api/model/attachment.go')
-rw-r--r--internal/api/model/attachment.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/model/attachment.go b/internal/api/model/attachment.go
index f9f1c95e9..1911fc9c3 100644
--- a/internal/api/model/attachment.go
+++ b/internal/api/model/attachment.go
@@ -70,10 +70,10 @@ type Attachment struct {
URL *string `json:"url"`
// A shorter URL for the attachment.
// In our case, we just give the URL again since we don't create smaller URLs.
- TextURL string `json:"text_url"`
+ TextURL *string `json:"text_url"`
// The location of a scaled-down preview of the attachment.
// example: https://example.org/fileserver/some_id/attachments/some_id/small/attachment.jpeg
- PreviewURL string `json:"preview_url"`
+ PreviewURL *string `json:"preview_url"`
// The location of the full-size original attachment on the remote server.
// Only defined for instances other than our own.
// example: https://some-other-server.org/attachments/original/ahhhhh.jpeg
@@ -83,13 +83,13 @@ type Attachment struct {
// example: https://some-other-server.org/attachments/small/ahhhhh.jpeg
PreviewRemoteURL *string `json:"preview_remote_url"`
// Metadata for this attachment.
- Meta MediaMeta `json:"meta,omitempty"`
+ Meta *MediaMeta `json:"meta"`
// Alt text that describes what is in the media attachment.
// example: This is a picture of a kitten.
Description *string `json:"description"`
// 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"`
+ Blurhash *string `json:"blurhash"`
}
// MediaMeta models media metadata.