File tree Expand file tree Collapse file tree
backend/open_webui/socket Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -790,6 +790,7 @@ async def __event_emitter__(event_data):
790790 },
791791 room = f"user:{ user_id } " ,
792792 )
793+
793794 if (
794795 update_db
795796 and message_id
@@ -799,16 +800,12 @@ async def __event_emitter__(event_data):
799800 event_type = event_data .get ("type" )
800801
801802 if event_type == "status" :
802- # Only persist final (done) status to DB; intermediate
803- # statuses are ephemeral UI-only data sent via socket.
804- status_data = event_data .get ("data" , {})
805- if status_data .get ("done" , False ):
806- await asyncio .to_thread (
807- Chats .add_message_status_to_chat_by_id_and_message_id ,
808- request_info ["chat_id" ],
809- request_info ["message_id" ],
810- status_data ,
811- )
803+ await asyncio .to_thread (
804+ Chats .add_message_status_to_chat_by_id_and_message_id ,
805+ request_info ["chat_id" ],
806+ request_info ["message_id" ],
807+ status_data ,
808+ )
812809
813810 elif event_type == "message" :
814811 message = await asyncio .to_thread (
You can’t perform that action at this time.
0 commit comments