refac
This commit is contained in:
1 parent
b7489bbc6c
commit
3cd72ee6a8
2 files changed
+3
No files matched your search
@@ -550,6 +550,8 @@ async def get_shared_folder_chats(
|
|||||||
owner_cache[uid] = u.name if u else 'Unknown'
|
owner_cache[uid] = u.name if u else 'Unknown'
|
||||||
chat['owner_name'] = owner_cache[uid]
|
chat['owner_name'] = owner_cache[uid]
|
||||||
chat['active'] = False
|
chat['active'] = False
|
||||||
|
if chat['user_id'] != user.id:
|
||||||
|
chat['last_read_at'] = chat['updated_at']
|
||||||
if await has_active_tasks(request.app.state.redis, chat['id']):
|
if await has_active_tasks(request.app.state.redis, chat['id']):
|
||||||
chat['active'] = await ChatMessages.has_unfinished_assistant_by_chat_id(chat['id'], db=db)
|
chat['active'] = await ChatMessages.has_unfinished_assistant_by_chat_id(chat['id'], db=db)
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,7 @@
|
|||||||
title={chat.title}
|
title={chat.title}
|
||||||
createdAt={chat.created_at}
|
createdAt={chat.created_at}
|
||||||
updatedAt={chat.updated_at}
|
updatedAt={chat.updated_at}
|
||||||
|
lastReadAt={chat.last_read_at}
|
||||||
active={chat.active ?? false}
|
active={chat.active ?? false}
|
||||||
ownerName={chat.owner_name}
|
ownerName={chat.owner_name}
|
||||||
ownerUserId={chat.user_id}
|
ownerUserId={chat.user_id}
|
||||||
|
|||||||
Reference in new issue
Block a user