Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make passed getEngagementLauncher queuesId paramater non-nullable #1092

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GliaWidgets/Public/Glia/Glia+EngagementLauncher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ extension Glia {
///
/// - Returns:
/// - `EngagementLauncher` instance.
public func getEngagementLauncher(queueIds: [String]?) throws -> EngagementLauncher {
let parameters = try getEngagementParameters(in: queueIds ?? [])
public func getEngagementLauncher(queueIds: [String]) throws -> EngagementLauncher {
let parameters = try getEngagementParameters(in: queueIds)
return try EngagementLauncher { [weak self] engagementKind, sceneProvider in
try self?.resolveEngangementState(
engagementKind: engagementKind,
Expand Down
10 changes: 5 additions & 5 deletions GliaWidgetsTests/Sources/Glia/GliaTests+EngagementLauncher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extension GliaTests {
) { _ in }

XCTAssertNoThrow(
try sdk.getEngagementLauncher(queueIds: nil)
try sdk.getEngagementLauncher(queueIds: [])
)
}

Expand All @@ -23,7 +23,7 @@ extension GliaTests {
theme: .mock()
) { _ in }

let engagementLauncher = try sdk.getEngagementLauncher(queueIds: nil)
let engagementLauncher = try sdk.getEngagementLauncher(queueIds: [])

try engagementLauncher.startChat()

Expand All @@ -38,7 +38,7 @@ extension GliaTests {
theme: .mock()
) { _ in }

let engagementLauncher = try sdk.getEngagementLauncher(queueIds: nil)
let engagementLauncher = try sdk.getEngagementLauncher(queueIds: [])

try engagementLauncher.startAudioCall()

Expand All @@ -53,7 +53,7 @@ extension GliaTests {
theme: .mock()
) { _ in }

let engagementLauncher = try sdk.getEngagementLauncher(queueIds: nil)
let engagementLauncher = try sdk.getEngagementLauncher(queueIds: [])

try engagementLauncher.startVideoCall()

Expand All @@ -68,7 +68,7 @@ extension GliaTests {
theme: .mock()
) { _ in }

let engagementLauncher = try sdk.getEngagementLauncher(queueIds: nil)
let engagementLauncher = try sdk.getEngagementLauncher(queueIds: [])

try engagementLauncher.startSecureMessaging()

Expand Down
Loading