mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-10-01 00:32:05 +00:00
fix: enforce inline result limit centrally
This commit is contained in:
@@ -192,7 +192,7 @@ async fn answer_inline_query(
|
|||||||
ctx.config.caption_quote_text_chars,
|
ctx.config.caption_quote_text_chars,
|
||||||
);
|
);
|
||||||
let mut results: Vec<InlineQueryResult> = Vec::new();
|
let mut results: Vec<InlineQueryResult> = Vec::new();
|
||||||
for (i, media) in fetched.media.iter().enumerate().take(50) {
|
for (i, media) in fetched.media.iter().enumerate() {
|
||||||
// Telegram fetches an inline result's URL itself and cannot
|
// Telegram fetches an inline result's URL itself and cannot
|
||||||
// send site-specific headers, so hotlink-protected media
|
// send site-specific headers, so hotlink-protected media
|
||||||
// (pixiv's pximg.net) would render as a broken file there.
|
// (pixiv's pximg.net) would render as a broken file there.
|
||||||
|
|||||||
Reference in New Issue
Block a user