mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -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),
|
type: this.encodefileType(f.type),
|
||||||
url: f.url ?? "",
|
url: f.url ?? "",
|
||||||
remote_url: f.url,
|
remote_url: f.url,
|
||||||
preview_url: f.thumbnailUrl,
|
preview_url: f.thumbnailUrl ?? f.url ?? "",
|
||||||
text_url: f.url,
|
text_url: f.url,
|
||||||
meta: {
|
meta: {
|
||||||
width: f.properties.width,
|
width: f.properties.width,
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace MastodonEntity {
|
||||||
type: "unknown" | "image" | "gifv" | "video" | "audio";
|
type: "unknown" | "image" | "gifv" | "video" | "audio";
|
||||||
url: string;
|
url: string;
|
||||||
remote_url: string | null;
|
remote_url: string | null;
|
||||||
preview_url: string | null;
|
preview_url: string;
|
||||||
text_url: string | null;
|
text_url: string | null;
|
||||||
meta: Meta | null;
|
meta: Meta | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
|
|
Loading…
Reference in a new issue