mirror of
https://github.com/mastodon/documentation
synced 2025-04-11 22:56:17 +02:00
Mark MediaAttachment.preview_url, blurhash as nullable (#1457)
* Mark MediaAttachment.preview_url as nullable
Had a payload in the wild where preview_url was `null` and the method that generates this value can certainly return `nil` if none of its conditions are met: d326ad0ed9/app/serializers/rest/media_attachment_serializer.rb (L30-L38)
Also both TootSDK and IceCubesApp have this property as nullable.
* Mark MediaAttachment.blurhash as nullable
When the attachment has type `audio`, `blurhash` is `null`.
This commit is contained in:
parent
28a7f3162c
commit
ce8146cf60
@ -186,7 +186,7 @@ aliases: [
|
||||
### `preview_url` {#preview_url}
|
||||
|
||||
**Description:** The location of a scaled-down preview of the attachment.\
|
||||
**Type:** String (URL)\
|
||||
**Type:** {{<nullable>}} String (URL)\
|
||||
**Version history:**\
|
||||
0.6.0 - added
|
||||
|
||||
@ -219,7 +219,7 @@ More importantly, there may be another topl-level `focus` Hash object on images
|
||||
### `blurhash` {#blurhash}
|
||||
|
||||
**Description:** A hash computed by [the BlurHash algorithm](https://github.com/woltapp/blurhash), for generating colorful preview thumbnails when media has not been downloaded yet.\
|
||||
**Type:** String (Blurhash)\
|
||||
**Type:** {{<nullable>}} String (Blurhash)\
|
||||
**Version history:**\
|
||||
2.8.1 - added
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user