Filter ranked search by public source and excluded text before pagination

This commit is contained in:
2026-12-03 03:20:18 +08:00
parent c0b5455582
commit 20d3d3fc62
7 changed files with 113 additions and 8 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ pub fn render(reply: Reply) -> Option<Value> {
match reply {
Reply::Ignored => None,
Reply::Help => Some(
json!({"text":"发送关键词或 /search 关键词。可用 type:channel、group、bot、post、video、photo、audio、file 筛选;用 /page 页码 关键词 翻页。"}),
json!({"text":"发送关键词或 /search 关键词。可用 type:channel、group、bot、post、video、photo、audio、file 筛选;可在关键词前加 from:@频道名 限定来源,或 exclude:广告 排除含该文字的结果。用 /page 页码 关键词 翻页。"}),
),
Reply::Results { total, links } if links.is_empty() => Some(
json!({"text":if total == 0 {"没有找到匹配结果。".into()} else {format!("本页没有结果,共 {total} 条。")}}),