Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
pallabmaiti committed Dec 14, 2023
1 parent 78785b0 commit 80591c3
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Sources/Classes/Client/Plugins/RSReplayQueuePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,22 @@ extension RSReplayQueuePlugin {
DispatchQueue.main.asyncAfter(deadline: .now() + TimeInterval(2)) { [weak self] in
guard let self = self else { return }
self.running = false
if isSourceEnabled {
if let destinationPlugins = self.getExternalDestinationPlugins() {
for event in self.queuedEvents {
destinationPlugins.forEach { plugin in
_ = plugin.execute(message: event)
if isSourceEnabled, let destinationPlugins = self.getExternalDestinationPlugins() {
for event in self.queuedEvents {
destinationPlugins.forEach { plugin in
switch event {
case let e as TrackMessage:
_ = plugin.execute(message: e)
case let e as IdentifyMessage:
_ = plugin.execute(message: e)
case let e as ScreenMessage:
_ = plugin.execute(message: e)
case let e as GroupMessage:
_ = plugin.execute(message: e)
case let e as AliasMessage:
_ = plugin.execute(message: e)
default:
break
}
}
}
Expand Down

0 comments on commit 80591c3

Please sign in to comment.