mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-09 11:41:30 -07: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
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue