follow up of a01ae38a07
This commit is contained in:
parent
a01ae38a07
commit
8e72c68205
|
@ -523,16 +523,20 @@ 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', {
|
||||
if (deleter) {
|
||||
const deleterIsModerator = await this.roleService.isModerator(deleter);
|
||||
|
||||
if (deleterIsModerator) {
|
||||
this.moderationLogService.log(deleter, 'deleteChatRoom', {
|
||||
roomId: room.id,
|
||||
room: room,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async findMyRoomById(ownerId: MiUser['id'], roomId: MiChatRoom['id']) {
|
||||
|
|
Loading…
Reference in New Issue