diff --git a/app/src/main/java/com/dscout/membranevideoroomdemo/viewmodels/RoomViewModel.kt b/app/src/main/java/com/dscout/membranevideoroomdemo/viewmodels/RoomViewModel.kt index 470223d..0b43484 100644 --- a/app/src/main/java/com/dscout/membranevideoroomdemo/viewmodels/RoomViewModel.kt +++ b/app/src/main/java/com/dscout/membranevideoroomdemo/viewmodels/RoomViewModel.kt @@ -309,7 +309,7 @@ class RoomViewModel( mutableParticipants[it.id] = Participant( it.id, - it.metadata["displayName"] as? String ?: "UNKNOWN", + it.metadata?.get("displayName") as? String ?: "UNKNOWN", null, null ) @@ -469,7 +469,7 @@ class RoomViewModel( mutableParticipants[endpoint.id] = Participant( id = endpoint.id, - displayName = endpoint.metadata["displayName"] as? String ?: "UNKNOWN" + displayName = endpoint.metadata?.get("displayName") as? String ?: "UNKNOWN" ) emitParticipants()