maybeAutoRequest method
void
maybeAutoRequest(})
Attempt auto-request for a key
Implementation
void maybeAutoRequest(
String roomId,
String sessionId,
String? senderKey, {
bool tryOnlineBackup = true,
bool onlineKeyBackupOnly = true,
}) {
final room = client.getRoomById(roomId);
final requestIdent = '$roomId|$sessionId';
if (room != null &&
!_requestedSessionIds.contains(requestIdent) &&
!client.isUnknownSession) {
// do e2ee recovery
_requestedSessionIds.add(requestIdent);
runInRoot(
() async => request(
room,
sessionId,
senderKey,
tryOnlineBackup: tryOnlineBackup,
onlineKeyBackupOnly: onlineKeyBackupOnly,
),
);
}
}