From a9b815dae725b8ae920d6e6321f8b4b6d0845f45 Mon Sep 17 00:00:00 2001 From: Aleksandar Apostolov Date: Wed, 30 Oct 2024 10:51:04 +0100 Subject: [PATCH] Log instead of crashing --- .../main/kotlin/io/getstream/video/android/core/CallState.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt b/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt index 35d36d5de5..85e9bba829 100644 --- a/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt +++ b/stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt @@ -1094,6 +1094,11 @@ public class CallState( } internal fun getOrCreateParticipant(participant: Participant): ParticipantState { + if (participant.session_id.isEmpty()) { + // Empty session ID is technically allowed but should not happen. + logger.w { "A user with empty session ID joined the call." } + } + val participantState = getOrCreateParticipant(participant.session_id, participant.user_id) participantState.updateFromParticipantInfo(participant)