カスタム絵文字のライセンスを一括でできるように (#10671)

* setlicensebulk追加

* 5時に誤字った!w

* 並び順の変更(set,add,removeの順

* add changelog
This commit is contained in:
nenohi
2023-04-19 08:25:24 +09:00
committed by GitHub
parent b26807b59b
commit 65ff2c2498
6 changed files with 74 additions and 1 deletions

View File

@@ -197,6 +197,22 @@ export class CustomEmojiService {
emojis: await this.emojiEntityService.packDetailedMany(ids),
});
}
@bindThis
public async setLicenseBulk(ids: Emoji['id'][], license: string | null) {
await this.emojisRepository.update({
id: In(ids),
}, {
updatedAt: new Date(),
license: license,
});
this.localEmojisCache.refresh();
this.globalEventService.publishBroadcastStream('emojiUpdated', {
emojis: await this.emojiEntityService.packDetailedMany(ids),
});
}
@bindThis
public async delete(id: Emoji['id']) {