getOlmSessions method

  1. @override
Future<List<OlmSession>> getOlmSessions(
  1. String identityKey,
  2. String userId
)
override

Implementation

@override
Future<List<OlmSession>> getOlmSessions(
    String identityKey, String userId) async {
  final rawSessions =
      await _olmSessionsBox.get(identityKey.toHiveKey) as Map? ?? {};

  return rawSessions.values
      .map((json) => OlmSession.fromJson(convertToJson(json), userId))
      .toList();
}