Skip to content

Commit

Permalink
fixup! Make interface for enqueueing with multiple queue
Browse files Browse the repository at this point in the history
These changes will allow integrators fetching available
queues without the needs to configure SDK with specific
queue id.

Deprecated:
- Interface for configuration SDK with queue ID

Introduced:
- Configuration method without queue id
- Starting engagement with queue ids

MOB-2594
  • Loading branch information
yurii-glia committed Sep 7, 2023
1 parent f4dba80 commit 245eb89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GliaWidgets/Public/Glia/Glia+StartEngagement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extension Glia {
) throws {
// `interactor?.queueIds.isEmpty == false` statement is needed for integrators who uses old interface
// and pass queue identifier through `configuration` function.
guard !queueIds.isEmpty || interactor?.queueIds.isEmpty == false else { throw GliaError.startEngagementWithNoQueueIds }
guard !queueIds.isEmpty || interactor?.queueIds.isEmpty == false else { throw GliaError.startingEngagementWithNoQueueIdsIsNotAllowed }
guard engagement == .none else { throw GliaError.engagementExists }
guard let interactor = self.interactor else { throw GliaError.sdkIsNotConfigured }
if let engagement = environment.coreSdk.getCurrentEngagement(),
Expand Down
2 changes: 1 addition & 1 deletion GliaWidgets/Public/GliaError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public enum GliaError: Error {
case callVisualizerEngagementExists
case configuringDuringEngagementIsNotAllowed
case clearingVisitorSessionDuringEngagementIsNotAllowed
case startEngagementWithNoQueueIds
case startingEngagementWithNoQueueIdsIsNotAllowed
}

0 comments on commit 245eb89

Please sign in to comment.