loadSingleKey method

Future<void> loadSingleKey(
  1. String roomId,
  2. String sessionId
)

Implementation

Future<void> loadSingleKey(String roomId, String sessionId) async {
  final info = await getRoomKeysBackupInfo();
  final ret =
      await client.getRoomKeyBySessionId(roomId, sessionId, info.version);
  final keys = RoomKeys.fromJson({
    'rooms': {
      roomId: {
        'sessions': {
          sessionId: ret.toJson(),
        },
      },
    },
  });
  await loadFromResponse(keys);
}