documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Add MetaDetails to MediaAttachment

Open abraham opened this issue 2 months ago • 2 comments

abraham avatar Oct 03 '25 14:10 abraham

i'm not sure about this change because the meta information is serialized from whatever media processor is processing the media attachments. this information has changed significantly before. the changes are not documented, but the structure is not strictly part of the API contract, and we don't have a custom serializer for it, nor do we have a MetaDetails entity:

https://github.com/mastodon/mastodon/blob/80c8a847409c73c4e9a086c8f398a984cf5c2137/app/serializers/rest/media_attachment_serializer.rb#L48-L50

the meta information defined in the model is like so, and anything other than that is not guaranteed:

https://github.com/mastodon/mastodon/blob/80c8a847409c73c4e9a086c8f398a984cf5c2137/app/models/media_attachment.rb#L53-L58

trwnh avatar Oct 04 '25 05:10 trwnh

These attributes are all nullable so there is no change to the existing implicit API contract. This just makes it easier for client developers to try and use the attributes when they are available.

abraham avatar Oct 18 '25 16:10 abraham