mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-10-06 01:22:16 +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:
@@ -235,7 +235,6 @@ impl Illustration {
|
||||
.original
|
||||
.clone()
|
||||
.map(|original| Media::Illustration {
|
||||
title: None,
|
||||
url: original,
|
||||
thumbnail_url: Some(page.image_urls.medium.clone()),
|
||||
fallback_url: Some(page.image_urls.large.clone()),
|
||||
@@ -248,7 +247,6 @@ impl Illustration {
|
||||
.or(model.image_urls.original.clone())
|
||||
{
|
||||
media.push(Media::Illustration {
|
||||
title: None,
|
||||
url: original,
|
||||
thumbnail_url: Some(model.image_urls.medium.clone()),
|
||||
fallback_url: Some(model.image_urls.large.clone()),
|
||||
|
||||
Reference in New Issue
Block a user