using a generic boolean capability model for booleans

This commit is contained in:
Adam Brown 2022-02-10 17:00:30 +00:00
parent 5af56f6b5d
commit a5f4413f6c
1 changed files with 4 additions and 3 deletions

View File

@ -37,9 +37,10 @@ internal data class GetCapabilitiesResult(
internal data class Capabilities( internal data class Capabilities(
/** /**
* Capability to indicate if the user can change their password. * Capability to indicate if the user can change their password.
* True if the user can change their password, false otherwise.
*/ */
@Json(name = "m.change_password") @Json(name = "m.change_password")
val changePassword: ChangePassword? = null, val changePassword: BooleanCapability? = null,
/** /**
* This capability describes the default and available room versions a server supports, and at what level of stability. * This capability describes the default and available room versions a server supports, and at what level of stability.
@ -50,9 +51,9 @@ internal data class Capabilities(
) )
@JsonClass(generateAdapter = true) @JsonClass(generateAdapter = true)
internal data class ChangePassword( internal data class BooleanCapability(
/** /**
* Required. True if the user can change their password, false otherwise. * Required.
*/ */
@Json(name = "enabled") @Json(name = "enabled")
val enabled: Boolean? val enabled: Boolean?