fix translating polls and spoilers (#4344)

The docs are wrong https://github.com/mastodon/documentation/pull/1423 🙄
This commit is contained in:
Konrad Pozniak 2024-03-29 21:13:57 +01:00 committed by GitHub
commit b022767ae6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 5 deletions

View file

@ -14,12 +14,20 @@ data class MediaTranslation(
*/
data class Translation(
val content: String,
@SerializedName("spoiler_warning")
val spoilerWarning: String?,
val poll: List<String>?,
@SerializedName("spoiler_text")
val spoilerText: String?,
val poll: TranslatedPoll?,
@SerializedName("media_attachments")
val mediaAttachments: List<MediaTranslation>,
@SerializedName("detected_source_language")
val detectedSourceLanguage: String,
val provider: String,
)
data class TranslatedPoll(
val options: List<TranslatedPollOption>
)
data class TranslatedPollOption(
val title: String
)