loadOutboundGroupSession method

Future<void> loadOutboundGroupSession(
  1. String roomId
)

Load an outbound group session from database

Implementation

Future<void> loadOutboundGroupSession(String roomId) async {
  final database = client.database;
  final userID = client.userID;
  if (_loadedOutboundGroupSessions.contains(roomId) ||
      _outboundGroupSessions.containsKey(roomId) ||
      database == null ||
      userID == null) {
    return; // nothing to do
  }
  _loadedOutboundGroupSessions.add(roomId);
  final sess = await database.getOutboundGroupSession(
    roomId,
    userID,
  );
  if (sess == null || !sess.isValid) {
    return;
  }
  _outboundGroupSessions[roomId] = sess;
}