mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-10-06 01:22:16 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user