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