fix: Allow nullable `sensitive` and `spoiler_text` status params (#1058)

This matches the API description and prevents an error when parsing JSON
responses.

Fixes #1057
This commit is contained in:
Nik Clayton 2024-10-29 15:14:07 +01:00 committed by GitHub
parent 8c28318474
commit 2f3895d2c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -23,9 +23,9 @@ import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class StatusParams(
val text: String,
val sensitive: Boolean,
val sensitive: Boolean?,
val visibility: Status.Visibility,
@Json(name = "spoiler_text") val spoilerText: String,
@Json(name = "spoiler_text") val spoilerText: String?,
@Json(name = "in_reply_to_id") val inReplyToId: String?,
val poll: NewPoll?,
val language: String? = null,