getUnimportantRoomEventStatesForRoom method
Implementation
@override
Future<List<Event>> getUnimportantRoomEventStatesForRoom(
List<String> events, Room room) async {
final keys = _roomStateBox.keys.where((key) {
final tuple = MultiKey.fromString(key);
return tuple.parts.first == room.id && !events.contains(tuple.parts[1]);
});
final unimportantEvents = <Event>[];
for (final key in keys) {
final Map states = await _roomStateBox.get(key);
unimportantEvents.addAll(
states.values.map((raw) => Event.fromJson(convertToJson(raw), room)));
}
return unimportantEvents;
}