mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
aa8ab349ed
commit
58d7ca35e3
1 changed files with 0 additions and 3 deletions
|
|
@ -544,14 +544,11 @@ def get_sources_from_items(
|
||||||
elif item.get("type") == "chat":
|
elif item.get("type") == "chat":
|
||||||
# Chat Attached
|
# Chat Attached
|
||||||
chat = Chats.get_chat_by_id(item.get("id"))
|
chat = Chats.get_chat_by_id(item.get("id"))
|
||||||
print("chat", chat)
|
|
||||||
|
|
||||||
if chat and (user.role == "admin" or chat.user_id == user.id):
|
if chat and (user.role == "admin" or chat.user_id == user.id):
|
||||||
messages_map = chat.chat.get("history", {}).get("messages", {})
|
messages_map = chat.chat.get("history", {}).get("messages", {})
|
||||||
message_id = chat.chat.get("history", {}).get("currentId")
|
message_id = chat.chat.get("history", {}).get("currentId")
|
||||||
|
|
||||||
print(messages_map, message_id)
|
|
||||||
|
|
||||||
if messages_map and message_id:
|
if messages_map and message_id:
|
||||||
# Reconstruct the message list in order
|
# Reconstruct the message list in order
|
||||||
message_list = get_message_list(messages_map, message_id)
|
message_list = get_message_list(messages_map, message_id)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue