Skip to content

Commit

Permalink
Relax session id validation (#1216)
Browse files Browse the repository at this point in the history
* Relax validation on the session_id

* Log instead of crashing

* Update log message
  • Loading branch information
aleksandar-apostolov authored Oct 31, 2024
1 parent bd82e9f commit 0b0209f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,9 @@ public class CallState(
}

internal fun getOrCreateParticipant(participant: Participant): ParticipantState {
// get or create the participant and update them
if (participant.session_id.isEmpty()) {
throw IllegalStateException("Participant session id is empty")
// Empty session ID is technically allowed but should not happen.
logger.w { "A user [id:${participant.user_id}] is in the call with empty session_id" }
}

val participantState = getOrCreateParticipant(participant.session_id, participant.user_id)
Expand Down

0 comments on commit 0b0209f

Please sign in to comment.