enhance: improve moderation log
This commit is contained in:
parent
55c14aec2c
commit
0dbf5175df
5 changed files with 26 additions and 0 deletions
|
@ -158,9 +158,13 @@ export class AnnouncementService {
|
|||
|
||||
if (moderator) {
|
||||
if (announcement.userId) {
|
||||
const user = await this.usersRepository.findOneByOrFail({ id: announcement.userId });
|
||||
this.moderationLogService.log(moderator, 'deleteUserAnnouncement', {
|
||||
announcementId: announcement.id,
|
||||
announcement: announcement,
|
||||
userId: announcement.userId,
|
||||
userUsername: user.username,
|
||||
userHost: user.host,
|
||||
});
|
||||
} else {
|
||||
this.moderationLogService.log(moderator, 'deleteGlobalAnnouncement', {
|
||||
|
|
|
@ -171,6 +171,9 @@ export type ModerationLogPayloads = {
|
|||
deleteUserAnnouncement: {
|
||||
announcementId: string;
|
||||
announcement: any;
|
||||
userId: string;
|
||||
userUsername: string;
|
||||
userHost: string | null;
|
||||
};
|
||||
resetPassword: {
|
||||
userId: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue