Skip to content

Commit

Permalink
transports(daily): fix on_participant_left event
Browse files Browse the repository at this point in the history
  • Loading branch information
aconchillo committed May 15, 2024
1 parent 3d6783d commit 28da747
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pipecat/transports/services/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class DailyCallbacks(BaseModel):
on_joined: Callable[[Mapping[str, Any]], None]
on_left: Callable[[], None]
on_participant_joined: Callable[[Mapping[str, Any]], None]
on_participant_left: Callable[[Mapping[str, Any]], None]
on_participant_left: Callable[[Mapping[str, Any], str], None]
on_first_participant_joined: Callable[[Mapping[str, Any]], None]
on_error: Callable[[str], None]

Expand Down Expand Up @@ -376,11 +376,11 @@ def on_participant_joined(self, participant):

self._callbacks.on_participant_joined(participant)

def on_participant_leave(self, participant):
def on_participant_left(self, participant, reason):
id = participant["id"]
logger.info(f"Participant left {id}")

self._callbacks.on_participant_left(participant)
self._callbacks.on_participant_left(participant, reason)

def on_transcription_message(self, message: Mapping[str, Any]):
participant_id = ""
Expand Down Expand Up @@ -655,8 +655,8 @@ def _on_error(self, error):
def _on_participant_joined(self, participant):
self.on_participant_joined(participant)

def _on_participant_left(self, participant):
self.on_participant_left(participant)
def _on_participant_left(self, participant, reason):
self.on_participant_left(participant, reason)

def _on_first_participant_joined(self, participant):
self.on_first_participant_joined(participant)
Expand Down Expand Up @@ -688,7 +688,7 @@ def on_left(self):
def on_participant_joined(self, participant):
pass

def on_participant_left(self, participant):
def on_participant_left(self, participant, reason):
pass

def on_first_participant_joined(self, participant):
Expand Down

0 comments on commit 28da747

Please sign in to comment.