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?;
  if (rawSessions == null || rawSessions.isEmpty) return <OlmSession>[];
  return rawSessions.values
      .map((json) => OlmSession.fromJson(convertToJson(json), userId))
      .toList();
}