From c66b52a29bf9a49b7d6d19b783494185ea747a2c Mon Sep 17 00:00:00 2001 From: mctaylors Date: Mon, 9 Jun 2025 00:01:29 +0300 Subject: [PATCH] feat: restore ability to open website from an inline query message Signed-off-by: mctaylors --- inline_query.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/inline_query.py b/inline_query.py index 527c605..eaacfb4 100644 --- a/inline_query.py +++ b/inline_query.py @@ -13,6 +13,7 @@ from telegram.constants import ParseMode from telegram.ext import ContextTypes import html_parser +from config import app from extensions import humanize_tags_from_json, format_rating, get_json @@ -102,9 +103,16 @@ async def answer_query( " ".join( [ html_parser.code(f"#{query}"), - html_parser.bold(f"{characters} ({copyrights})"), - "drawn by", - html_parser.bold(artists), + html_parser.hyperlink( + " ".join( + [ + html_parser.bold(f"{characters} ({copyrights})"), + "drawn by", + html_parser.bold(artists), + ] + ), + f"{app.protocol}://{app.hostname}/posts/{query}", + ), rating, ] ),