mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2025-01-21 13:02:53 +09:00
[mastodon-client] Emoji category should be string or undefined
This commit is contained in:
parent
3132ff5ca0
commit
98b451bf05
@ -1,13 +1,13 @@
|
|||||||
import { PopulatedEmoji } from "@/misc/populate-emojis.js";
|
import { PopulatedEmoji } from "@/misc/populate-emojis.js";
|
||||||
|
|
||||||
export class EmojiConverter {
|
export class EmojiConverter {
|
||||||
public static encode(e: PopulatedEmoji) {
|
public static encode(e: PopulatedEmoji): MastodonEntity.Emoji {
|
||||||
return {
|
return {
|
||||||
shortcode: e.name,
|
shortcode: e.name,
|
||||||
static_url: e.url,
|
static_url: e.url,
|
||||||
url: e.url,
|
url: e.url,
|
||||||
visible_in_picker: true,
|
visible_in_picker: true,
|
||||||
category: null
|
category: undefined
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,6 @@ namespace MastodonEntity {
|
|||||||
static_url: string;
|
static_url: string;
|
||||||
url: string;
|
url: string;
|
||||||
visible_in_picker: boolean;
|
visible_in_picker: boolean;
|
||||||
category: string;
|
category: string | undefined;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ export class MiscHelpers {
|
|||||||
.map(x => {
|
.map(x => {
|
||||||
return {
|
return {
|
||||||
...x,
|
...x,
|
||||||
category: dbRes.find(y => y.name === x.shortcode)?.category ?? null
|
category: dbRes.find(y => y.name === x.shortcode)?.category ?? undefined
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user