mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(api): 🐛 Fix emoji editing always making the emoji non-global
This commit is contained in:
parent
57e17e7607
commit
2743528727
|
|
@ -309,7 +309,10 @@ export default apiRoute((app) => {
|
|||
modified.shortcode = shortcode ?? modified.shortcode;
|
||||
modified.alt = alt ?? modified.alt;
|
||||
modified.category = category ?? modified.category;
|
||||
|
||||
if (emojiGlobal !== undefined) {
|
||||
modified.ownerId = emojiGlobal ? null : user.data.id;
|
||||
}
|
||||
|
||||
await emoji.update(modified);
|
||||
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ export class Emoji extends BaseInterface<typeof Emojis, EmojiWithInstance> {
|
|||
visible_in_picker: this.data.visibleInPicker,
|
||||
category: this.data.category ?? undefined,
|
||||
global: this.data.ownerId === null,
|
||||
description: this.data.alt ?? undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue