Fix test ensuring room is left when disconnected from LiveKit
This commit is contained in:
parent
ad37034960
commit
aa44de3d16
2 changed files with 3 additions and 4 deletions
|
@ -426,11 +426,9 @@ impl Room {
|
|||
}
|
||||
|
||||
if let Some(participants) = remote_participants.log_err() {
|
||||
let mut participant_peer_ids = HashSet::default();
|
||||
for (participant, user) in room.participants.into_iter().zip(participants) {
|
||||
let Some(peer_id) = participant.peer_id else { continue };
|
||||
this.participant_user_ids.insert(participant.user_id);
|
||||
participant_peer_ids.insert(participant.user_id);
|
||||
|
||||
let old_projects = this
|
||||
.remote_participants
|
||||
|
@ -467,6 +465,7 @@ impl Room {
|
|||
this.remote_participants.get_mut(&participant.user_id)
|
||||
{
|
||||
remote_participant.projects = participant.projects;
|
||||
remote_participant.peer_id = peer_id;
|
||||
if location != remote_participant.location {
|
||||
remote_participant.location = location;
|
||||
cx.emit(Event::ParticipantLocationChanged {
|
||||
|
@ -500,7 +499,7 @@ impl Room {
|
|||
}
|
||||
|
||||
this.remote_participants.retain(|user_id, participant| {
|
||||
if participant_peer_ids.contains(user_id) {
|
||||
if this.participant_user_ids.contains(user_id) {
|
||||
true
|
||||
} else {
|
||||
for project in &participant.projects {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue