* put rereg mode params into a struct for sharability * add step and UI handling for when we become deregistered during post-reg steps * handle dereg when syncing push tokens * show generic error on kbs backup failure * handle dereg when restoring from kbs * handle dereg during profile setup steps * finalize pni stuff before deregistering * add comment * change debug fail to log * Navigate to verification vc before showing popup so that we don't cancel the nav controller pop * send a session sms code even if we get interrupted right after session creation * improve state handling for initial session sms code * nit: make var fileprivate * show error when state changed on screen
27 lines
685 B
Swift
27 lines
685 B
Swift
//
|
|
// Copyright 2023 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public enum RegistrationMode {
|
|
case registering
|
|
case reRegistering(ReregistrationParams)
|
|
case changingNumber(ChangeNumberParams)
|
|
|
|
public struct ReregistrationParams: Codable, Equatable {
|
|
public let e164: E164
|
|
public let aci: UUID
|
|
}
|
|
|
|
public struct ChangeNumberParams: Codable, Equatable {
|
|
public let oldE164: E164
|
|
public let oldAuthToken: String
|
|
public let localAci: UUID
|
|
public let localAccountId: String
|
|
public let localDeviceId: UInt32
|
|
public let localUserAllDeviceIds: [UInt32]
|
|
}
|
|
}
|