-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Copy pathRegistrationMode.swift
38 lines (33 loc) · 1.02 KB
/
RegistrationMode.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
public import LibSignalClient
public import SignalServiceKit
public enum RegistrationMode: CustomDebugStringConvertible {
case registering
case reRegistering(ReregistrationParams)
case changingNumber(ChangeNumberParams)
public struct ReregistrationParams: Codable, Equatable {
public let e164: E164
@AciUuid public var aci: Aci
}
public struct ChangeNumberParams: Codable, Equatable {
public let oldE164: E164
public let oldAuthToken: String
@AciUuid public var localAci: Aci
public let localAccountId: String
public let localDeviceId: DeviceId
public let localUserAllDeviceIds: [DeviceId]
}
public var debugDescription: String {
switch self {
case .registering:
return "registering"
case .reRegistering:
return "reRegistering"
case .changingNumber:
return "changingNumber"
}
}
}