fix: recognize @botfather as bot peer (special case, not pattern change)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-29 11:11:28 +04:00
parent 362e7a765b
commit 878847ce89
2 changed files with 2 additions and 2 deletions

View File

@@ -546,7 +546,7 @@ impl App {
let url = format!("{}/v1/alias/whois/{}", client.base_url, normfp(&peer));
match client.client.get(&url).send().await {
Ok(resp) => resp.json::<serde_json::Value>().await.ok()
.and_then(|d| d.get("alias").and_then(|a| a.as_str().map(|s| s.ends_with("bot") || s.ends_with("Bot") || s.ends_with("_bot"))))
.and_then(|d| d.get("alias").and_then(|a| a.as_str().map(|s| s.ends_with("bot") || s.ends_with("Bot") || s.ends_with("_bot") || s == "botfather")))
.unwrap_or(false),
Err(_) => false,
}