mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-04-27 02:16:31 +02:00
follow up of a01ae38a07
This commit is contained in:
parent
a01ae38a07
commit
8e72c68205
1 changed files with 10 additions and 6 deletions
|
@ -523,14 +523,18 @@ export class ChatService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public async deleteRoom(room: MiChatRoom, moderator?: MiUser) {
|
||||
public async deleteRoom(room: MiChatRoom, deleter?: MiUser) {
|
||||
await this.chatRoomsRepository.delete(room.id);
|
||||
|
||||
if (moderator) {
|
||||
this.moderationLogService.log(moderator, 'deleteChatRoom', {
|
||||
roomId: room.id,
|
||||
room: room,
|
||||
});
|
||||
if (deleter) {
|
||||
const deleterIsModerator = await this.roleService.isModerator(deleter);
|
||||
|
||||
if (deleterIsModerator) {
|
||||
this.moderationLogService.log(deleter, 'deleteChatRoom', {
|
||||
roomId: room.id,
|
||||
room: room,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue