File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ async function onUpdate (update) {
58
58
* https://core.telegram.org/bots/api#message
59
59
*/
60
60
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 )
63
63
}
64
64
65
65
/**
@@ -79,21 +79,21 @@ async function sendPlainText (chatId, text) {
79
79
*/
80
80
async function onInlineQuery ( inlineQuery ) {
81
81
const originalURL = inlineQuery . query ;
82
- const { fixedURL , title} = await getFixedURL ( originalURL )
82
+ const { url , title} = await getFixedURL ( originalURL )
83
83
const results = [ ( {
84
84
type : 'article' ,
85
85
id : crypto . randomUUID ( ) ,
86
86
title : title ,
87
- url : fixedURL ,
87
+ url : url ,
88
88
hide_url : true ,
89
89
//thumbnail_url: originalURL,
90
- description : fixedURL ,
90
+ description : url ,
91
91
input_message_content : {
92
- message_text : `[${ title } ](${ fixedURL } )` ,
92
+ message_text : `[${ title } ](${ url } )` ,
93
93
parse_mode : "markdown" ,
94
94
link_preview_options : {
95
95
is_disabled : false ,
96
- url : fixedURL
96
+ url : url
97
97
}
98
98
}
99
99
} ) ]
@@ -128,7 +128,7 @@ async function getFixedURL (originalURL) {
128
128
129
129
console . log ( "Fixed URL: " , url )
130
130
return {
131
- text : url . toString ( ) ,
131
+ url : url . toString ( ) ,
132
132
title : title
133
133
}
134
134
}
You can’t perform that action at this time.
0 commit comments