more correct fallback for unknown join conditions

This commit is contained in:
Henry Hiles 2026-10-22 14:32:58 -04:00
commit fcfe4eed1e
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -21,6 +21,8 @@ sealed class JoinRulesContent extends Content with _$JoinRulesContent {
@JsonSerializable()
class const AllowCondition({
final String? roomId,
@JsonKey(unknownEnumValue: AllowConditionType.unknown)
required final AllowConditionType type,
}) with _$AllowCondition {
Map<String, Object?> toJson() => _$AllowConditionToJson(this);
@ -32,4 +34,5 @@ class const AllowCondition({
enum AllowConditionType {
@JsonValue("m.room_membership")
membership,
unknown,
}