prepareOutboundGroupSession method

Future<void> prepareOutboundGroupSession(
  1. String roomId
)

Prepares an outbound group session for a given room ID. That is, load it from the database, cycle it if needed and create it if absent.

Implementation

Future<void> prepareOutboundGroupSession(String roomId) async {
  if (getOutboundGroupSession(roomId) == null) {
    await loadOutboundGroupSession(roomId);
  }
  await clearOrUseOutboundGroupSession(roomId, use: false);
  if (getOutboundGroupSession(roomId) == null) {
    await createOutboundGroupSession(roomId);
  }
}