Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

fix(core): release the sync-name read's connection before renaming the room

raullopez-sandbox0021e7a7a332
diff --git a/core/switch_core/gateway/rooms.py b/core/switch_core/gateway/rooms.py
index 73e19108e..07f102526 100644
--- a/core/switch_core/gateway/rooms.py
+++ b/core/switch_core/gateway/rooms.py
@@ -1276,10 +1276,11 @@ async def sync_room_name(
status_code=409,
detail="Switch has not seen the name of a channel linked to this room.",
)
+ # `take_platform_name` opens a session of its own (`_require_room_released`).
+ await session.commit()
await room_service.take_platform_name(
room.id, f"{bridge.display_name}: {channel_name}", channel_name
)
- await session.commit()
await session.refresh(room)
return await _build_room_detail(
session, room, room_store, bridge_store, external_user_store, protocol