enhance?: DeleteAccountServiceでユーザーを削除する際にuserChangeDeletedStateを発行する (#13382)

This commit is contained in:
tamaina 2024-02-23 18:15:39 +09:00 committed by GitHub
parent d834232232
commit c0156b740b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import { QueueService } from '@/core/QueueService.js';
import { UserSuspendService } from '@/core/UserSuspendService.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
@Injectable()
export class DeleteAccountService {
@ -18,6 +19,7 @@ export class DeleteAccountService {
private userSuspendService: UserSuspendService,
private queueService: QueueService,
private globalEventService: GlobalEventService,
) {
}
@ -39,5 +41,7 @@ export class DeleteAccountService {
await this.usersRepository.update(user.id, {
isDeleted: true,
});
this.globalEventService.publishInternalEvent('userChangeDeletedState', { id: user.id, isDeleted: true });
}
}