fluffychat/lib/pangea/extensions/room_capacity_extension.dart
ggurdin dc8bb8fe8c
4307 bot in dms and activity chats only (#4319)
* remove bot settings files

* exclude bot in invite page

* listen to language / CERF level changes and update bot DM settings

* Update lib/pangea/common/controllers/pangea_controller.dart

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-10 10:29:57 -04:00

16 lines
405 B
Dart

part of "pangea_room_extension.dart";
extension RoomCapacityExtension on Room {
Future<void> updateRoomCapacity(int newCapacity) =>
client.setRoomStateWithKey(
id,
PangeaEventTypes.capacity,
'',
{'capacity': newCapacity},
);
int? get capacity {
final t = getState(PangeaEventTypes.capacity)?.content['capacity'];
return t is int ? t : null;
}
}