diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index aeeb3da7..6ca1cfb3 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -455,7 +455,7 @@ def _retrieve_remote_participant( participant = self.participants[sid] return participant - def _retrieve_participant(self, sid: str, identity: str) -> Participant: + def _retrieve_participant(self, sid: str, identity: str) -> Optional[Participant]: """Retrieve a participant by sid or identity, returns the LocalParticipant if sid or identity matches""" if identity and identity == self.local_participant.identity: