mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-11 22:52:54 +00:00
refac
This commit is contained in:
parent
251b80ebec
commit
aa51ce482c
1 changed files with 8 additions and 6 deletions
|
|
@ -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'],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue