From 2f3895d2c411eec8071b2cab191f5c0b63353f49 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Tue, 29 Oct 2024 15:14:07 +0100 Subject: [PATCH] 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 --- .../main/kotlin/app/pachli/core/network/model/StatusParams.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/network/src/main/kotlin/app/pachli/core/network/model/StatusParams.kt b/core/network/src/main/kotlin/app/pachli/core/network/model/StatusParams.kt index 9c420ad98..25d129817 100644 --- a/core/network/src/main/kotlin/app/pachli/core/network/model/StatusParams.kt +++ b/core/network/src/main/kotlin/app/pachli/core/network/model/StatusParams.kt @@ -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,