Identify LiveKit room participants by user id, not peer id

This way, their participant id can remain the same when they reconnect.
This commit is contained in:
Max Brunsfeld 2022-12-15 17:19:32 -08:00
parent c2f5381e5a
commit ad37034960
9 changed files with 55 additions and 42 deletions

View file

@ -148,7 +148,7 @@ impl Member {
.and_then(|leader_id| {
let room = active_call?.read(cx).room()?.read(cx);
let collaborator = project.read(cx).collaborators().get(leader_id)?;
let participant = room.remote_participants().get(&leader_id)?;
let participant = room.remote_participant_for_peer_id(*leader_id)?;
Some((collaborator.replica_id, participant))
});