Sadly fields cannot be private
This commit is contained in:
parent
ee265f71e6
commit
2e23fec82b
@ -27,7 +27,7 @@ import timber.log.Timber
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class RoomGuestAccessContent(
|
||||
// Required. Whether guests can join the room. One of: ["can_join", "forbidden"]
|
||||
@Json(name = "guest_access") private val _guestAccess: String? = null
|
||||
@Json(name = "guest_access") val _guestAccess: String? = null
|
||||
) {
|
||||
val guestAccess: GuestAccess? = when (_guestAccess) {
|
||||
"can_join" -> GuestAccess.CanJoin
|
||||
|
@ -22,7 +22,7 @@ import timber.log.Timber
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class RoomHistoryVisibilityContent(
|
||||
@Json(name = "history_visibility") private val _historyVisibility: String? = null
|
||||
@Json(name = "history_visibility") val _historyVisibility: String? = null
|
||||
) {
|
||||
val historyVisibility: RoomHistoryVisibility? = when (_historyVisibility) {
|
||||
"world_readable" -> RoomHistoryVisibility.WORLD_READABLE
|
||||
|
@ -25,8 +25,8 @@ import timber.log.Timber
|
||||
* Class representing the EventType.STATE_ROOM_JOIN_RULES state event content
|
||||
*/
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class RoomJoinRulesContent constructor(
|
||||
@Json(name = "join_rule") private val _joinRules: String? = null
|
||||
data class RoomJoinRulesContent(
|
||||
@Json(name = "join_rule") val _joinRules: String? = null
|
||||
) {
|
||||
val joinRules: RoomJoinRules? = when (_joinRules) {
|
||||
"public" -> RoomJoinRules.PUBLIC
|
||||
|
Loading…
x
Reference in New Issue
Block a user