feat: id is now hyperlinked
All checks were successful
Build / Upload to production (push) Successful in 1m19s
All checks were successful
Build / Upload to production (push) Successful in 1m19s
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
40b9ca48c9
commit
e2f8653441
1 changed files with 12 additions and 13 deletions
|
@ -56,6 +56,8 @@ async def answer_query(
|
|||
]
|
||||
]
|
||||
|
||||
id_string = HtmlFormat.hyperlink(f"#{query}", f"{config.app.protocol}://{config.app.hostname}/posts/{query}")
|
||||
|
||||
if data["is_banned"]:
|
||||
results = [
|
||||
InlineQueryResultArticle(
|
||||
|
@ -65,7 +67,7 @@ async def answer_query(
|
|||
input_message_content=InputTextMessageContent(
|
||||
" ".join(
|
||||
[
|
||||
HtmlFormat.code(f"#{query}"),
|
||||
id_string,
|
||||
HtmlFormat.strikethrough(
|
||||
" ".join(
|
||||
[
|
||||
|
@ -101,8 +103,7 @@ async def answer_query(
|
|||
input_message_content=InputTextMessageContent(
|
||||
" ".join(
|
||||
[
|
||||
HtmlFormat.code(f"#{query}"),
|
||||
HtmlFormat.hyperlink(
|
||||
id_string,
|
||||
" ".join(
|
||||
[
|
||||
HtmlFormat.bold(f"{characters} ({copyrights})"),
|
||||
|
@ -110,8 +111,6 @@ async def answer_query(
|
|||
HtmlFormat.bold(artists),
|
||||
]
|
||||
),
|
||||
f"{config.app.protocol}://{config.app.hostname}/posts/{query}",
|
||||
),
|
||||
rating,
|
||||
]
|
||||
),
|
||||
|
@ -132,7 +131,7 @@ async def invalid_query(update: Update, query: int) -> None:
|
|||
title=f"#{query}",
|
||||
description="Error",
|
||||
input_message_content=InputTextMessageContent(
|
||||
" ".join([HtmlFormat.code(f"#{query}"), "That record was not found."]),
|
||||
" ".join([HtmlFormat.strikethrough(f"#{query}"), "That record was not found."]),
|
||||
parse_mode=ParseMode.HTML,
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue