refac
This commit is contained in:
@@ -1155,7 +1155,7 @@ async def search_chats(
|
||||
|
||||
# Find a matching message snippet
|
||||
snippet = ''
|
||||
messages = chat.chat.get('history', {}).get('messages', {})
|
||||
messages = (getattr(chat, 'chat', None) or {}).get('history', {}).get('messages', {})
|
||||
lower_query = query.lower()
|
||||
|
||||
for msg_id, msg in messages.items():
|
||||
|
||||
Reference in New Issue
Block a user