Preview card returned without mandatory `author_name` property
Environment
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): Backend 2.5.5 / Frontend eec27700
Bug description
Hi, Pachli (https://pachli.app) dev. here. A user's just reported a crash when Pachli processes Pleroma PreviewCard JSON in a status. The crash indicates that the author_name
propertyis missing from the JSON.
com.squareup.moshi.JsonDataException: Required value 'authorName' (JSON name 'author_name') missing at $
at com.squareup.moshi.internal.Util.e(SourceFile:44)
at app.pachli.core.network.model.CardJsonAdapter.fromJson(SourceFile:54)
at app.pachli.core.network.model.CardJsonAdapter.fromJson(SourceFile:1)
...
This property is mandatory and non-null, per https://docs.joinmastodon.org/entities/PreviewCard/#author_name.
I checked https://docs-develop.pleroma.social/backend/development/API/differences_in_mastoapi_responses/ and didn't see this listed as a difference between Pleroma and the Mastodon API, so I assume this is a bug.
Edited by Nik Clayton