mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 13:04:34 +00: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
|
@bindThis
|
||||||
public async deleteRoom(room: MiChatRoom, moderator?: MiUser) {
|
public async deleteRoom(room: MiChatRoom, deleter?: MiUser) {
|
||||||
await this.chatRoomsRepository.delete(room.id);
|
await this.chatRoomsRepository.delete(room.id);
|
||||||
|
|
||||||
if (moderator) {
|
if (deleter) {
|
||||||
this.moderationLogService.log(moderator, 'deleteChatRoom', {
|
const deleterIsModerator = await this.roleService.isModerator(deleter);
|
||||||
roomId: room.id,
|
|
||||||
room: room,
|
if (deleterIsModerator) {
|
||||||
});
|
this.moderationLogService.log(deleter, 'deleteChatRoom', {
|
||||||
|
roomId: room.id,
|
||||||
|
room: room,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue