mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-18 05:05:09 +02:00
refac
This commit is contained in:
@@ -888,13 +888,15 @@ async def get_event_emitter(request_info, update_db=True):
|
||||
)
|
||||
|
||||
elif event_type == 'embeds':
|
||||
message = await Chats.get_message_by_id_and_message_id(
|
||||
request_info['chat_id'],
|
||||
request_info['message_id'],
|
||||
)
|
||||
event_payload = event_data.get('data', {})
|
||||
embeds = event_payload.get('embeds', [])
|
||||
|
||||
embeds = event_data.get('data', {}).get('embeds', [])
|
||||
embeds.extend(message.get('embeds', []))
|
||||
if not event_payload.get('replace', False):
|
||||
message = await Chats.get_message_by_id_and_message_id(
|
||||
request_info['chat_id'],
|
||||
request_info['message_id'],
|
||||
)
|
||||
embeds.extend(message.get('embeds', []))
|
||||
|
||||
await Chats.upsert_message_to_chat_by_id_and_message_id(
|
||||
request_info['chat_id'],
|
||||
|
||||
Reference in New Issue
Block a user