joinRules property
JoinRules?
get
joinRules
A room may be public meaning anyone can join the room without any prior action. Alternatively, it can be invite meaning that a user who wishes to join the room must first receive an invite to the room from someone already inside of the room. Currently, knock and private are reserved keywords which are not implemented.
Implementation
JoinRules? get joinRules {
final joinRulesString =
getState(EventTypes.RoomJoinRules)?.content.tryGet<String>('join_rule');
return JoinRules.values
.singleWhereOrNull((element) => element.text == joinRulesString);
}