Skip to content

Commit

Permalink
Update room.py
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Oct 1, 2024
1 parent a7ff526 commit ba27179
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions livekit-rtc/livekit/rtc/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,16 +449,16 @@ def _on_room_event(self, event: proto_room.RoomEvent):
self.emit("participant_disconnected", rparticipant)
elif which == "local_track_published":
sid = event.local_track_published.track_sid
lpublication = self._local_participant.track_publications[sid]
lpublication = self.local_participant.track_publications[sid]
track = lpublication.track
self.emit("local_track_published", lpublication, track)
elif which == "local_track_unpublished":
sid = event.local_track_unpublished.publication_sid
lpublication = self._local_participant.track_publications[sid]
lpublication = self.local_participant.track_publications[sid]
self.emit("local_track_unpublished", lpublication)
elif which == "local_track_subscribed":
sid = event.local_track_subscribed.track_sid
lpublication = self._local_participant.track_publications[sid]
lpublication = self.local_participant.track_publications[sid]
lpublication._first_subscription.set_result(None)
self.emit("local_track_subscribed", lpublication.track)
elif which == "track_published":
Expand Down Expand Up @@ -687,8 +687,8 @@ def _retrieve_remote_participant(

def _retrieve_participant(self, identity: str) -> Optional[Participant]:
"""Retrieve a local or remote participant by identity"""
if identity and identity == self._local_participant.identity:
return self._local_participant
if identity and identity == self.local_participant.identity:
return self.local_participant

return self._retrieve_remote_participant(identity)

Expand Down

0 comments on commit ba27179

Please sign in to comment.