Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

add power level room settings

This commit is contained in:
Henry Hiles 2026-10-22 15:29:02 -04:00
commit b0dd452926
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -0,0 +1,11 @@
import "package:fast_immutable_collections/fast_immutable_collections.dart";
import "package:nexus/models/content/power_levels.dart";
class const RoomPowerLevels({
required final PowerLevelsContent content,
final ISet<String> creators = const .empty(),
}) {
double levelOf(String userId) => creators.contains(userId)
? double.infinity
: (content.users[userId] ?? content.usersDefault).toDouble();
}