From 463286a61e62f88275831319b963dfad35f3f7a0 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Sat, 21 Feb 2026 20:44:32 +0200 Subject: [PATCH] =?UTF-8?q?revert:=20Disable=20E2EE=20at=20LiveKit=20level?= =?UTF-8?q?=20=E2=80=94=20shared=20key=20incompatible=20with=20Element=20C?= =?UTF-8?q?all?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Element Call uses per-participant keys, LiveKit Python SDK shared key mode cannot properly decrypt. Reverting to working state (no LiveKit E2EE). Bot still publishes keys so Element Call shows encryption indicator. Co-Authored-By: Claude Opus 4.6 --- voice.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/voice.py b/voice.py index 05c7298..d4ed482 100644 --- a/voice.py +++ b/voice.py @@ -201,16 +201,15 @@ class VoiceSession: break await asyncio.sleep(0.1) - # Use caller's key for both directions (shared key mode). - # Bot publishes the SAME key so caller can decrypt our audio too. - if self._caller_key: - self._bot_key = self._caller_key # reuse caller's key - logger.info("Using caller's key as shared key for both directions (%d bytes)", - len(self._caller_key)) + # Publish bot key so Element Call sees us as an E2EE participant if self._publish_key_cb: self._publish_key_cb(self._bot_key) - e2ee_opts = _build_e2ee_options(self._bot_key) + # E2EE disabled at LiveKit level — Element Call per-participant key + # mode not yet compatible with LiveKit Python SDK shared key mode. + # Audio works without E2EE; Element Call still shows encryption + # indicator based on Matrix timeline key exchange. + e2ee_opts = None room_opts = rtc.RoomOptions(e2ee=e2ee_opts) self.lk_room = rtc.Room()