refactor(x-media): read Fetched::site_id instead of the site_name alias

site_name() only returned the public site_id field; the five callers (the
/debug report, the caption-format lookup on both fetch paths, the per-site
override in urls.rs) read the field now.
This commit is contained in:
2026-09-21 17:16:21 +08:00
parent 4e42855c59
commit c8a32d49c9
4 changed files with 6 additions and 13 deletions
+2 -2
View File
@@ -715,7 +715,7 @@ async fn url_media_inner(
// Per-site caption format override (empty -> built-in caption).
let format = chat_data
.message_format
.get(fetched.site_name())
.get(fetched.site_id)
.cloned()
.unwrap_or_default();
let caption = fetched.caption_with(&format);
@@ -864,7 +864,7 @@ async fn refetch(
let chat_data = ctx.chat_store.get(chat_id).await;
let format = chat_data
.message_format
.get(fetched.site_name())
.get(fetched.site_id)
.cloned()
.unwrap_or_default();
let caption = fetched.caption_with(&format);