revert: Disable E2EE at LiveKit level — shared key incompatible with Element Call

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 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-21 20:44:32 +02:00
parent 2d8a7b4420
commit 463286a61e

View File

@@ -201,16 +201,15 @@ class VoiceSession:
break break
await asyncio.sleep(0.1) await asyncio.sleep(0.1)
# Use caller's key for both directions (shared key mode). # Publish bot key so Element Call sees us as an E2EE participant
# 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))
if self._publish_key_cb: if self._publish_key_cb:
self._publish_key_cb(self._bot_key) 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) room_opts = rtc.RoomOptions(e2ee=e2ee_opts)
self.lk_room = rtc.Room() self.lk_room = rtc.Room()