mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 10:19:06 +01: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";
|
||||
|
||||
export class EmojiConverter {
|
||||
public static encode(e: PopulatedEmoji) {
|
||||
public static encode(e: PopulatedEmoji): MastodonEntity.Emoji {
|
||||
return {
|
||||
shortcode: e.name,
|
||||
static_url: e.url,
|
||||
url: e.url,
|
||||
visible_in_picker: true,
|
||||
category: null
|
||||
category: undefined
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ namespace MastodonEntity {
|
||||
static_url: string;
|
||||
url: string;
|
||||
visible_in_picker: boolean;
|
||||
category: string;
|
||||
category: string | undefined;
|
||||
};
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ export class MiscHelpers {
|
||||
.map(x => {
|
||||
return {
|
||||
...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