diff --git a/backend/open_webui/socket/main.py b/backend/open_webui/socket/main.py index d59ff53277..10959b30f4 100644 --- a/backend/open_webui/socket/main.py +++ b/backend/open_webui/socket/main.py @@ -898,8 +898,9 @@ async def _make_channel_emitter(request_info): async def get_event_emitter(request_info, update_db=True): - # Channel mode: route pipeline output to channel message updates - if request_info.get('chat_id', '').startswith('channel:'): + # Channel mode: route pipeline output to channel message updates. + # `or ''` (not the .get default) because chat_id may be present as None. + if (request_info.get('chat_id') or '').startswith('channel:'): return await _make_channel_emitter(request_info) async def __event_emitter__(event_data):