Compare commits

..

No commits in common. "e2f8653441f95889875ac54915d5ac59431a1ef1" and "1d40f6ae5d4c1bbd8577645ce814d391be6c7832" have entirely different histories.

View file

@ -53,11 +53,11 @@ async def answer_query(
"Show information",
url=helpers.create_deep_linked_url(context.bot.username, str(query)),
),
InlineKeyboardButton(f"Open in {config.app.name}",
url=f"{config.app.protocol}://{config.app.hostname}/posts/{query}"),
]
]
id_string = HtmlFormat.hyperlink(f"#{query}", f"{config.app.protocol}://{config.app.hostname}/posts/{query}")
if data["is_banned"]:
results = [
InlineQueryResultArticle(
@ -67,7 +67,7 @@ async def answer_query(
input_message_content=InputTextMessageContent(
" ".join(
[
id_string,
HtmlFormat.code(f"#{query}"),
HtmlFormat.strikethrough(
" ".join(
[
@ -92,8 +92,6 @@ async def answer_query(
await update.inline_query.answer(results)
return
keyboard[0].append(InlineKeyboardButton("View original", url=data["file_url"]))
results = [
InlineQueryResultArticle(
id=str(uuid4()),
@ -103,7 +101,7 @@ async def answer_query(
input_message_content=InputTextMessageContent(
" ".join(
[
id_string,
HtmlFormat.code(f"#{query}"),
" ".join(
[
HtmlFormat.bold(f"{characters} ({copyrights})"),
@ -131,7 +129,7 @@ async def invalid_query(update: Update, query: int) -> None:
title=f"#{query}",
description="Error",
input_message_content=InputTextMessageContent(
" ".join([HtmlFormat.strikethrough(f"#{query}"), "That record was not found."]),
" ".join([HtmlFormat.code(f"#{query}"), "That record was not found."]),
parse_mode=ParseMode.HTML,
),
)