wip
This commit is contained in:
parent
a5f54580a9
commit
2f6c45e118
12 changed files with 114 additions and 37 deletions
|
@ -2,6 +2,8 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||
import { DataSource, In, IsNull } from 'typeorm';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import type { DriveFile } from '@/models/entities/DriveFile.js';
|
||||
import type { Emoji } from '@/models/entities/Emoji.js';
|
||||
import type { EmojisRepository } from '@/models/index.js';
|
||||
|
@ -17,6 +19,8 @@ export class CustomEmojiService {
|
|||
private emojisRepository: EmojisRepository,
|
||||
|
||||
private idService: IdService,
|
||||
private emojiEntityService: EmojiEntityService,
|
||||
private globalEventService: GlobalEventService,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@ -42,6 +46,10 @@ export class CustomEmojiService {
|
|||
|
||||
await this.db.queryResultCache!.remove(['meta_emojis']);
|
||||
|
||||
this.globalEventService.publishBroadcastStream('emojiAdded', {
|
||||
emoji: await this.emojiEntityService.pack(emoji.id),
|
||||
});
|
||||
|
||||
return emoji;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue