|
|
|
|
@ -923,17 +923,17 @@ extension PangeaRoom on Room {
|
|
|
|
|
?.content
|
|
|
|
|
.tryGet<int>('events_default');
|
|
|
|
|
|
|
|
|
|
bool? get locked {
|
|
|
|
|
bool get locked {
|
|
|
|
|
if (isDirectChat) return false;
|
|
|
|
|
if (!isSpace) {
|
|
|
|
|
if (eventsDefaultPowerLevel == null) return null;
|
|
|
|
|
if (eventsDefaultPowerLevel == null) return false;
|
|
|
|
|
return (eventsDefaultPowerLevel ?? 0) >=
|
|
|
|
|
ClassDefaultValues.powerLevelOfAdmin;
|
|
|
|
|
}
|
|
|
|
|
for (final child in spaceChildren) {
|
|
|
|
|
if (child.roomId == null) continue;
|
|
|
|
|
final Room? room = client.getRoomById(child.roomId!);
|
|
|
|
|
if (room?.locked == false && (room?.canChangePowerLevel ?? false)) {
|
|
|
|
|
if (room?.locked == false) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|