refac
This commit is contained in:
1 parent
1de36d600f
commit
85c47fb467
2 files changed
+9
-3
No files matched your search
@@ -1309,9 +1309,15 @@ async def update_chat_by_id(
|
|||||||
form_data.chat.get('history'),
|
form_data.chat.get('history'),
|
||||||
)
|
)
|
||||||
|
|
||||||
chat = await Chats.update_chat_by_id(id, updated_chat, db=db)
|
touch = 'history' in form_data.chat or 'messages' in form_data.chat
|
||||||
|
chat = await Chats.update_chat_by_id(id, updated_chat, db=db, touch=touch)
|
||||||
if form_data.variables is not None:
|
if form_data.variables is not None:
|
||||||
chat = await Chats.update_chat_variables_by_id(id, form_data.variables, db=db) or chat
|
chat = await Chats.update_chat_variables_by_id(
|
||||||
|
id,
|
||||||
|
form_data.variables,
|
||||||
|
db=db,
|
||||||
|
touch=False,
|
||||||
|
) or chat
|
||||||
|
|
||||||
# Reconcile chat_message rows without inferring deletes from missing IDs.
|
# Reconcile chat_message rows without inferring deletes from missing IDs.
|
||||||
# Message deletion has its own endpoint below.
|
# Message deletion has its own endpoint below.
|
||||||
|
|||||||
@@ -235,7 +235,7 @@
|
|||||||
|
|
||||||
<div class="hidden sm:flex sm:basis-2/5 items-center justify-end gap-2">
|
<div class="hidden sm:flex sm:basis-2/5 items-center justify-end gap-2">
|
||||||
<div class=" text-gray-500 dark:text-gray-400 text-xs">
|
<div class=" text-gray-500 dark:text-gray-400 text-xs">
|
||||||
{dayjs(((chat.updated_at ?? chat.created_at) ?? 0) * 1000).calendar()}
|
{dayjs((chat.updated_at ?? chat.created_at ?? 0) * 1000).calendar()}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if showOwnerInfo && chat.user_id && chat.owner_name}
|
{#if showOwnerInfo && chat.user_id && chat.owner_name}
|
||||||
|
|||||||
Reference in new issue
Block a user