From 57c4d72bf016d215e85eff04eb18cd9fc30604c0 Mon Sep 17 00:00:00 2001 From: ajmeraharsh Date: Mon, 9 Mar 2026 02:51:35 +0400 Subject: [PATCH 1/2] fix(livekit): remove redundant self arg in on_call_state_updated event _on_call_state_updated passes (self, state) to _call_event_handler, but _run_handler already prepends self when invoking the handler. This causes handlers to receive 3 positional arguments instead of 2, making the on_call_state_updated event unusable. This aligns with how _on_first_participant_joined correctly passes only the data arg without self. --- src/pipecat/transports/livekit/transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/transports/livekit/transport.py b/src/pipecat/transports/livekit/transport.py index 7e9c1de35..3fb3d1694 100644 --- a/src/pipecat/transports/livekit/transport.py +++ b/src/pipecat/transports/livekit/transport.py @@ -1244,7 +1244,7 @@ class LiveKitTransport(BaseTransport): async def _on_call_state_updated(self, state: str): """Handle call state update events.""" - await self._call_event_handler("on_call_state_updated", self, state) + await self._call_event_handler("on_call_state_updated", state) async def _on_first_participant_joined(self, participant_id: str): """Handle first participant joined events.""" From ae6f159b182932f92c5fbe21c79422249df407f9 Mon Sep 17 00:00:00 2001 From: ajmeraharsh Date: Mon, 9 Mar 2026 09:15:03 +0400 Subject: [PATCH 2/2] chore: add changelog entry for #3959 --- changelog/3959.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/3959.fixed.md diff --git a/changelog/3959.fixed.md b/changelog/3959.fixed.md new file mode 100644 index 000000000..a10521d92 --- /dev/null +++ b/changelog/3959.fixed.md @@ -0,0 +1 @@ +- Fixed `on_call_state_updated` event handler in LiveKit transport receiving incorrect number of arguments due to redundant `self` passed to `_call_event_handler`.