mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-29 00:12:12 +00:00
refactor(x-media): drop Media's write-only title field
Every adapter set title (mostly None) on all three Media variants and nothing ever read it: the bot's CachedMedia carries kind/file_id/url, and the one read was misskey's own test. Removing it also drops misskey's DriveFile.name, which existed only to feed it. Fetched::title (the post's own headline, which captions do use) is untouched.
This commit is contained in:
@@ -816,13 +816,11 @@ mod tests {
|
||||
fn debug_report_renders_fields_and_media() {
|
||||
let media = vec![
|
||||
Media::Illustration {
|
||||
title: None,
|
||||
url: "https://cdn.example/1.jpg".into(),
|
||||
thumbnail_url: None,
|
||||
fallback_url: None,
|
||||
},
|
||||
Media::Video {
|
||||
title: None,
|
||||
url: "https://cdn.example/2.mp4".into(),
|
||||
thumbnail_url: "https://cdn.example/2.jpg".into(),
|
||||
},
|
||||
@@ -915,7 +913,6 @@ mod tests {
|
||||
// 200 media lines ≈ 8 KB, comfortably over the cap.
|
||||
let media: Vec<Media> = (0..200)
|
||||
.map(|i| Media::Illustration {
|
||||
title: None,
|
||||
url: format!("https://cdn.example/{i}.jpg"),
|
||||
thumbnail_url: None,
|
||||
fallback_url: None,
|
||||
|
||||
Reference in New Issue
Block a user