Skip to content
Snippets Groups Projects
Commit e92cb521 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Start network follower when restoring backup

parent f8321d30
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!100Messenger - restore from backup
......@@ -48,6 +48,7 @@ extension MessengerRestoreBackup {
password: password,
cMixParamsJSON: env.getCMixParams()
)
try cMix.startNetworkFollower(timeoutMS: 30_000)
let e2e = try env.login(
cMixId: cMix.getId(),
authCallbacks: env.authCallbacks.registered(),
......
......@@ -71,6 +71,9 @@ final class MessengerRestoreBackupTests: XCTestCase {
caughtActions.append(.cMixDidMakeReceptionIdentity(legacy: legacy))
return receptionIdentity
}
cMix.startNetworkFollower.run = { timeoutMS in
caughtActions.append(.cMixDidStartNetworkFollower(timeoutMS: timeoutMS))
}
return cMix
}
env.login.run = { ephemeral, cMixId, _, identity, e2eParams in
......@@ -130,6 +133,9 @@ final class MessengerRestoreBackupTests: XCTestCase {
password: password,
cMixParams: cMixParams
),
.cMixDidStartNetworkFollower(
timeoutMS: 30_000
),
.cMixDidMakeReceptionIdentity(
legacy: true
),
......@@ -213,6 +219,9 @@ private enum CaughtAction: Equatable {
case cMixDidMakeReceptionIdentity(
legacy: Bool
)
case cMixDidStartNetworkFollower(
timeoutMS: Int
)
case didNewUdManagerFromBackup(
params: NewUdManagerFromBackup.Params
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment