From 6291cb5108c0bd2a2e824d3b3e4635388ac0849b Mon Sep 17 00:00:00 2001 From: ComRSMaster <57138289+ComRSMaster@users.noreply.github.com> Date: Mon, 5 Aug 2024 11:33:20 +0300 Subject: [PATCH] Fix /chat cmd not working because empty names --- functions/chat_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/chat_cmd.py b/functions/chat_cmd.py index f5b1b22f..8f73181b 100644 --- a/functions/chat_cmd.py +++ b/functions/chat_cmd.py @@ -58,7 +58,7 @@ async def inline_query_photo(inline_query: InlineQuery): "WHERE `only_chess` = 0 AND (`name` LIKE %s OR `desc` LIKE %s)" "ORDER BY `name` LIMIT %s, %s", (query, query, offset, 50)): results.append(InlineQueryResultArticle( - u[0], u[1], InputTextMessageContent(f"/chat {u[0]}"), + u[0], u[1] else ' ', InputTextMessageContent(f"/chat {u[0]}"), description=f"{u[2] or ''}\nНажмите, чтобы написать {'этому человеку' if u[4] else 'в эту группу'}", thumbnail_url=None if u[3] is None else f'{web_url}p/{u[3]}.jpg'))