Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Add safe calls
Browse files Browse the repository at this point in the history
  • Loading branch information
incubo4u committed Jan 10, 2024
1 parent d93ee4f commit f001447
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit f001447

Please sign in to comment.