Skip to content

Remove facts from BackupParams

 struct BackupParams {
   var username: String
-  var email: String?
-  var phone: String? 
 }

Backed-up facts are automatically restored when restoring UserDiscovery and can be retrieved from it with getFacts function.

let result = try env.messenger.restoreBackup(
  backupData: backupData,
  backupPassphrase: backupPassphrase
)
let facts = try env.messenger.ud.tryGet().getFacts()
let restoredUsername = result.restoredParams.username
let restoredEmail = facts.get(.email)?.value
let restoredPhone = facts.get(.phone)?.value

Merge request reports