絵文字の追加周り

This commit is contained in:
mattyatea 2023-09-26 10:54:01 +09:00
parent 0b89548481
commit bc12bba97d
8 changed files with 178 additions and 7 deletions

View file

@ -231,7 +231,36 @@ export class CustomEmojiService implements OnApplicationShutdown {
emojis: await this.emojiEntityService.packDetailedMany(ids),
});
}
@bindThis
public async setLocalOnlyBulk(ids: MiEmoji['id'][], localOnly: boolean | false) {
await this.emojisRepository.update({
id: In(ids),
}, {
updatedAt: new Date(),
localOnly: localOnly,
});
this.localEmojisCache.refresh();
this.globalEventService.publishBroadcastStream('emojiUpdated', {
emojis: await this.emojiEntityService.packDetailedMany(ids),
});
}
@bindThis
public async setisSensitiveBulk(ids: MiEmoji['id'][], isSensitive: boolean | false) {
await this.emojisRepository.update({
id: In(ids),
}, {
updatedAt: new Date(),
isSensitive: isSensitive,
});
this.localEmojisCache.refresh();
this.globalEventService.publishBroadcastStream('emojiUpdated', {
emojis: await this.emojiEntityService.packDetailedMany(ids),
});
}
@bindThis
public async setLicenseBulk(ids: MiEmoji['id'][], license: string | null) {
await this.emojisRepository.update({