mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-27 06:18:06 +09:00
[backend/masto-client] Fall back to full-res url if an attachment's thumbnailUrl is null
The API docs say this field is nullable, but the official android app crashes if it is set to null.
This commit is contained in:
parent
e2b7d80871
commit
4f21fd9b91
@ -7,7 +7,7 @@ export class FileConverter {
|
||||
type: this.encodefileType(f.type),
|
||||
url: f.url ?? "",
|
||||
remote_url: f.url,
|
||||
preview_url: f.thumbnailUrl,
|
||||
preview_url: f.thumbnailUrl ?? f.url ?? "",
|
||||
text_url: f.url,
|
||||
meta: {
|
||||
width: f.properties.width,
|
||||
|
@ -40,7 +40,7 @@ namespace MastodonEntity {
|
||||
type: "unknown" | "image" | "gifv" | "video" | "audio";
|
||||
url: string;
|
||||
remote_url: string | null;
|
||||
preview_url: string | null;
|
||||
preview_url: string;
|
||||
text_url: string | null;
|
||||
meta: Meta | null;
|
||||
description: string | null;
|
||||
|
Loading…
Reference in New Issue
Block a user