Merge tag '2023.9.1' into merge-upstream

This commit is contained in:
riku6460 2023-09-27 04:56:47 +09:00
commit 3a57fb2b4b
No known key found for this signature in database
GPG key ID: 27414FA27DB94CF6
39 changed files with 326 additions and 107 deletions

View file

@ -162,10 +162,13 @@ export class AnnouncementService {
});
if (moderator) {
const user = await this.usersRepository.findOneByOrFail({ id: values.userId });
this.moderationLogService.log(moderator, 'createUserAnnouncement', {
announcementId: announcement.id,
announcement: announcement,
userId: values.userId,
userUsername: user.username,
userHost: user.host,
});
}
} else {
@ -255,10 +258,14 @@ export class AnnouncementService {
if (moderator) {
if (announcement.userId) {
const user = await this.usersRepository.findOneByOrFail({ id: announcement.userId });
this.moderationLogService.log(moderator, 'updateUserAnnouncement', {
announcementId: announcement.id,
before: announcement,
after: after,
userId: announcement.userId,
userUsername: user.username,
userHost: user.host,
});
} else {
this.moderationLogService.log(moderator, 'updateGlobalAnnouncement', {