Skip to content

Commit 7d9b317

Browse files
authored
Fixing experiments
1 parent 95ae783 commit 7d9b317

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

worker.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ async function onUpdate (update) {
5858
* https://core.telegram.org/bots/api#message
5959
*/
6060
async function onMessage (message) {
61-
const {fixedURL, title} = await getFixedURL(message)
62-
return sendPlainText(message.chat.id, fixedURL)
61+
const {url, title} = await getFixedURL(message)
62+
return sendPlainText(message.chat.id, url)
6363
}
6464

6565
/**
@@ -79,21 +79,21 @@ async function sendPlainText (chatId, text) {
7979
*/
8080
async function onInlineQuery (inlineQuery) {
8181
const originalURL = inlineQuery.query;
82-
const {fixedURL, title} = await getFixedURL(originalURL)
82+
const {url, title} = await getFixedURL(originalURL)
8383
const results = [({
8484
type: 'article',
8585
id: crypto.randomUUID(),
8686
title: title,
87-
url: fixedURL,
87+
url: url,
8888
hide_url: true,
8989
//thumbnail_url: originalURL,
90-
description: fixedURL,
90+
description: url,
9191
input_message_content: {
92-
message_text: `[${title}](${fixedURL})`,
92+
message_text: `[${title}](${url})`,
9393
parse_mode: "markdown",
9494
link_preview_options: {
9595
is_disabled: false,
96-
url: fixedURL
96+
url: url
9797
}
9898
}
9999
})]
@@ -128,7 +128,7 @@ async function getFixedURL (originalURL) {
128128

129129
console.log("Fixed URL: ", url)
130130
return {
131-
text: url.toString(),
131+
url: url.toString(),
132132
title: title
133133
}
134134
}

0 commit comments

Comments
 (0)