Skip to content

Commit

Permalink
Propagate call ended correctly to subscribers (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandar-apostolov authored Apr 1, 2024
1 parent f5a4ea6 commit 53b7591
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,6 @@ internal class StreamVideoImpl internal constructor(
callEvent?.getCallCID()
} ?: ""

if (selectedCid.isNotEmpty()) {
calls[selectedCid]?.let {
it.state.handleEvent(event)
it.session?.handleEvent(event)
it.handleEvent(event)
}
}

// client level subscriptions
subscriptions.forEach { sub ->
if (!sub.isDisposed) {
Expand All @@ -527,6 +519,14 @@ internal class StreamVideoImpl internal constructor(
if (selectedCid.isNotEmpty()) {
calls[selectedCid]?.fireEvent(event)
}

if (selectedCid.isNotEmpty()) {
calls[selectedCid]?.let {
it.state.handleEvent(event)
it.session?.handleEvent(event)
it.handleEvent(event)
}
}
}

internal suspend fun getCall(type: String, id: String): Result<GetCallResponse> {
Expand Down

0 comments on commit 53b7591

Please sign in to comment.