mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-10-08 01:42:05 +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:
@@ -37,18 +37,15 @@ impl Media {
|
||||
#[derive(Debug)]
|
||||
pub enum Media {
|
||||
Illustration {
|
||||
title: Option<String>,
|
||||
url: String,
|
||||
thumbnail_url: Option<String>,
|
||||
fallback_url: Option<String>,
|
||||
},
|
||||
Video {
|
||||
title: Option<String>,
|
||||
url: String,
|
||||
thumbnail_url: String,
|
||||
},
|
||||
Animated {
|
||||
title: Option<String>,
|
||||
url: String,
|
||||
thumbnail_url: String,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user