fix: filter own key events, fix RoomOptions None, wait for participant

- Skip bot own encryption_keys events in on_unknown handler
- Always pass valid RoomOptions to AgentSession.start()
- Wait up to 10s for remote participant to connect before starting pipeline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-21 17:33:12 +02:00
parent 6e1e9839cc
commit 08f4e115b9
2 changed files with 19 additions and 6 deletions

5
bot.py
View File

@@ -370,9 +370,12 @@ class Bot:
await self._route_verification(room, event)
return
# Forward encryption key events to active voice sessions
# Forward encryption key events to active voice sessions (skip our own)
if event.type == ENCRYPTION_KEYS_TYPE:
if event.sender == BOT_USER:
return # ignore our own key events
room_id = room.room_id
logger.info("Got encryption_keys timeline event from %s in %s", event.sender, room_id)
vs = self.voice_sessions.get(room_id)
if vs:
content = event.source.get("content", {})