絵文字の追加周り
This commit is contained in:
parent
0b89548481
commit
bc12bba97d
8 changed files with 178 additions and 7 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue