mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix(api): 🐛 Properly include global field in API emojis
This commit is contained in:
parent
46933c1bef
commit
ca42df1dfd
|
|
@ -1,6 +1,6 @@
|
|||
import { emojiValidatorWithColons, emojiValidatorWithIdentifiers } from "@/api";
|
||||
import { proxyUrl } from "@/response";
|
||||
import type { Emoji as ApiEmoji } from "@versia/client/types";
|
||||
import type { Emoji as APIEmoji } from "@versia/client/types";
|
||||
import type { CustomEmojiExtension } from "@versia/federation/types";
|
||||
import { db } from "@versia/kit/db";
|
||||
import { Emojis, Instances } from "@versia/kit/tables";
|
||||
|
|
@ -187,7 +187,7 @@ export class Emoji extends BaseInterface<typeof Emojis, EmojiWithInstance> {
|
|||
);
|
||||
}
|
||||
|
||||
public toApi(): ApiEmoji & { id: string } {
|
||||
public toApi(): APIEmoji {
|
||||
return {
|
||||
id: this.id,
|
||||
shortcode: this.data.shortcode,
|
||||
|
|
@ -195,6 +195,7 @@ export class Emoji extends BaseInterface<typeof Emojis, EmojiWithInstance> {
|
|||
url: proxyUrl(this.data.url) ?? "",
|
||||
visible_in_picker: this.data.visibleInPicker,
|
||||
category: this.data.category ?? undefined,
|
||||
global: this.data.ownerId === null,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
"@oclif/core": "^4.0.33",
|
||||
"@sentry/bun": "^8.41.0",
|
||||
"@tufjs/canonical-json": "^2.0.0",
|
||||
"@versia/client": "^0.1.1",
|
||||
"@versia/client": "^0.1.2",
|
||||
"@versia/federation": "^0.1.4",
|
||||
"@versia/kit": "workspace:*",
|
||||
"altcha-lib": "^1.1.1",
|
||||
|
|
|
|||
Loading…
Reference in a new issue