Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus
nexus/lib/models/room_power_levels.dart

11 lines
418 B
Dart

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();
}