From 9110be7f0fce090246cb521eb05cf7491f3fc28f Mon Sep 17 00:00:00 2001 From: Rykov7 Date: Wed, 1 Feb 2023 21:17:21 +0300 Subject: [PATCH] fix allowing telegra.ph --- app/bot.py | 2 +- app/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/bot.py b/app/bot.py index 2243611..b2c0e01 100644 --- a/app/bot.py +++ b/app/bot.py @@ -216,7 +216,7 @@ def default_query(inline_query): if phrase.casefold().startswith(q) or ' ' + q in phrase.casefold(): zen.append(types.InlineQueryResultArticle( f"{id_p}", f'The Zen of Python #{id_p + 1}', types.InputTextMessageContent( - f"{phrase}"), description=phrase)) + f"{phrase}"), description=phrase)) bot.answer_inline_query(inline_query.id, zen, cache_time=1200) diff --git a/app/config.py b/app/config.py index cd73c7b..b01244b 100644 --- a/app/config.py +++ b/app/config.py @@ -24,7 +24,7 @@ PYTHONCHATRU = -1001338616632 # pythonchatru URL_RX = re.compile(r'\w+\.\w+/\w+') ALLOWED_WORDS = ['paste', 'nekobin', 'github', 'google', 'nometa', 'python', 'django', 'flask', 'fastapi', 'wiki', - 'stackoverflow', 'habr', 'medium', 'youtu', 'stepik', 'telegraph', '#rtfm', 'support'] + 'stackoverflow', 'habr', 'medium', 'youtu', 'stepik', 'telegra', '#rtfm', 'support'] WHITEUN = set(os.environ.get('whitelist', '<<