Skip to content

Commit

Permalink
rename mls alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
nakajima committed Feb 5, 2024
1 parent 327b000 commit b74d035
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Sources/XMTPiOS/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ public struct ClientOptions {
/// `preCreateIdentityCallback` will be called immediately before a Create Identity wallet signature is requested from the user.
public var preCreateIdentityCallback: PreEventCallback?

public var enableAlphaMLS: MLSAlphaOption = .disabled
public var mlsAlpha: MLSAlphaOption = .disabled
public var mlsEncryptionKey: Data?

public init(
api: Api = Api(),
codecs: [any ContentCodec] = [],
preEnableIdentityCallback: PreEventCallback? = nil,
preCreateIdentityCallback: PreEventCallback? = nil,
enableAlphaMLS: MLSAlphaOption = .disabled,
mlsAlpha: MLSAlphaOption = .disabled,
mlsEncryptionKey: Data? = nil
) {
self.api = api
self.codecs = codecs
self.preEnableIdentityCallback = preEnableIdentityCallback
self.preCreateIdentityCallback = preCreateIdentityCallback
self.enableAlphaMLS = enableAlphaMLS
self.mlsAlpha = mlsAlpha
self.mlsEncryptionKey = mlsEncryptionKey
}
}
Expand Down Expand Up @@ -122,7 +122,7 @@ public final class Client {
source: LegacyIdentitySource,
privateKeyBundleV1: PrivateKeyBundleV1
) async throws -> FfiXmtpClient? {
if case let .enabled(signingKey) = options?.enableAlphaMLS, options?.api.env == .local {
if case let .enabled(signingKey) = options?.mlsAlpha, options?.api.env == .local {
let dbURL = URL.documentsDirectory.appendingPathComponent("xmtp-\(options?.api.env.rawValue ?? "")-\(address).db3")
let v3Client = try await LibXMTP.createClient(
logger: XMTPLogger(),
Expand Down
10 changes: 5 additions & 5 deletions Tests/XMTPTests/ClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ClientTests: XCTestCase {
account: bo,
options: .init(
api: .init(env: .local, isSecure: false),
enableAlphaMLS: .enabled(bo)
mlsAlpha: .enabled(bo)
)
)
} catch {
Expand All @@ -46,7 +46,7 @@ class ClientTests: XCTestCase {
account: bo,
options: .init(
api: .init(env: .local, isSecure: false),
enableAlphaMLS: .enabled(bo)
mlsAlpha: .enabled(bo)
)
)

Expand All @@ -56,7 +56,7 @@ class ClientTests: XCTestCase {
options: .init(
api: .init(env: .local, isSecure: false),
// Should not need to pass the signer again
enableAlphaMLS: .enabled(nil)
mlsAlpha: .enabled(nil)
)
)

Expand All @@ -73,7 +73,7 @@ class ClientTests: XCTestCase {
account: bo,
options: .init(
api: .init(env: .local, isSecure: false),
enableAlphaMLS: .enabled(bo),
mlsAlpha: .enabled(bo),
mlsEncryptionKey: key
)
)
Expand All @@ -83,7 +83,7 @@ class ClientTests: XCTestCase {
account: bo,
options: .init(
api: .init(env: .local, isSecure: false),
enableAlphaMLS: .enabled(bo),
mlsAlpha: .enabled(bo),
mlsEncryptionKey: nil // No key should error
)
)
Expand Down

0 comments on commit b74d035

Please sign in to comment.