getAllMemberStateEvents method

Future<List<SDNEvent>> getAllMemberStateEvents()

Implementation

Future<List<SDNEvent>> getAllMemberStateEvents() async {
  final List<SDNEvent> events = [];
  final roomStates = await client.getRoomState(room.id);
  roomStates.sort((a, b) => a.originServerTs.compareTo(b.originServerTs));
  roomStates.forEach((value) {
    if (value.type == EventTypes.GroupCallMemberPrefix &&
        !room.callMemberStateIsExpired(value, groupCallId)) {
      events.add(value);
    }
  });
  return events;
}