diff --git a/packages/backend/src/server/api/mastodon/converters/emoji.ts b/packages/backend/src/server/api/mastodon/converters/emoji.ts index 7e66f622b..4ee8d459d 100644 --- a/packages/backend/src/server/api/mastodon/converters/emoji.ts +++ b/packages/backend/src/server/api/mastodon/converters/emoji.ts @@ -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 }; } } diff --git a/packages/backend/src/server/api/mastodon/entities/emoji.ts b/packages/backend/src/server/api/mastodon/entities/emoji.ts index 04c135d23..7a6133fa3 100644 --- a/packages/backend/src/server/api/mastodon/entities/emoji.ts +++ b/packages/backend/src/server/api/mastodon/entities/emoji.ts @@ -4,6 +4,6 @@ namespace MastodonEntity { static_url: string; url: string; visible_in_picker: boolean; - category: string; + category: string | undefined; }; } diff --git a/packages/backend/src/server/api/mastodon/helpers/misc.ts b/packages/backend/src/server/api/mastodon/helpers/misc.ts index 7fc85c982..8ddf11b1f 100644 --- a/packages/backend/src/server/api/mastodon/helpers/misc.ts +++ b/packages/backend/src/server/api/mastodon/helpers/misc.ts @@ -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 } }) )