diff --git a/app/src/main/java/app/pachli/network/ServerRepository.kt b/app/src/main/java/app/pachli/network/ServerRepository.kt index e70be6b05..2973b9057 100644 --- a/app/src/main/java/app/pachli/network/ServerRepository.kt +++ b/app/src/main/java/app/pachli/network/ServerRepository.kt @@ -108,7 +108,8 @@ class ServerRepository @Inject constructor( mastodonApi.getInstanceV2().fold( { Server.from(nodeInfo.software, it).mapError(::Capabilities) }, - { + { throwable -> + Timber.e(throwable, "Couldn't process /api/v2/instance result") mastodonApi.getInstanceV1().fold( { Server.from(nodeInfo.software, it).mapError(::Capabilities) }, { Err(GetInstanceInfoV1(it)) }, diff --git a/core/network/src/main/kotlin/app/pachli/core/network/model/Account.kt b/core/network/src/main/kotlin/app/pachli/core/network/model/Account.kt index a94241714..4fb787685 100644 --- a/core/network/src/main/kotlin/app/pachli/core/network/model/Account.kt +++ b/core/network/src/main/kotlin/app/pachli/core/network/model/Account.kt @@ -91,6 +91,10 @@ data class Role( val name: String, /** Colour to use for the role badge, may be the empty string */ val color: String, + // Default value is true, since the property may be missing and the observed + // Mastodon behaviour when it is is to highlight the role. Also, this property + // being missing breaks InstanceV2 parsing. + // See https://github.com/mastodon/mastodon/issues/28327 /** True if the badge should be displayed on the account profile */ - val highlighted: Boolean, + val highlighted: Boolean = true, )