diff options
Diffstat (limited to 'server/lib/notifier/shared/abuse')
3 files changed, 6 insertions, 6 deletions
diff --git a/server/lib/notifier/shared/abuse/abstract-new-abuse-message.ts b/server/lib/notifier/shared/abuse/abstract-new-abuse-message.ts index a7292de69..1dc1ccfc2 100644 --- a/server/lib/notifier/shared/abuse/abstract-new-abuse-message.ts +++ b/server/lib/notifier/shared/abuse/abstract-new-abuse-message.ts | |||
@@ -21,8 +21,8 @@ export abstract class AbstractNewAbuseMessage extends AbstractNotification <NewA | |||
21 | return user.NotificationSetting.abuseNewMessage | 21 | return user.NotificationSetting.abuseNewMessage |
22 | } | 22 | } |
23 | 23 | ||
24 | async createNotification (user: MUserWithNotificationSetting) { | 24 | createNotification (user: MUserWithNotificationSetting) { |
25 | const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ | 25 | const notification = UserNotificationModel.build<UserNotificationModelForApi>({ |
26 | type: UserNotificationType.ABUSE_NEW_MESSAGE, | 26 | type: UserNotificationType.ABUSE_NEW_MESSAGE, |
27 | userId: user.id, | 27 | userId: user.id, |
28 | abuseId: this.abuse.id | 28 | abuseId: this.abuse.id |
diff --git a/server/lib/notifier/shared/abuse/abuse-state-change-for-reporter.ts b/server/lib/notifier/shared/abuse/abuse-state-change-for-reporter.ts index d92f7a13b..97e896c6a 100644 --- a/server/lib/notifier/shared/abuse/abuse-state-change-for-reporter.ts +++ b/server/lib/notifier/shared/abuse/abuse-state-change-for-reporter.ts | |||
@@ -32,8 +32,8 @@ export class AbuseStateChangeForReporter extends AbstractNotification <MAbuseFul | |||
32 | return [ this.user ] | 32 | return [ this.user ] |
33 | } | 33 | } |
34 | 34 | ||
35 | async createNotification (user: MUserWithNotificationSetting) { | 35 | createNotification (user: MUserWithNotificationSetting) { |
36 | const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ | 36 | const notification = UserNotificationModel.build<UserNotificationModelForApi>({ |
37 | type: UserNotificationType.ABUSE_STATE_CHANGE, | 37 | type: UserNotificationType.ABUSE_STATE_CHANGE, |
38 | userId: user.id, | 38 | userId: user.id, |
39 | abuseId: this.abuse.id | 39 | abuseId: this.abuse.id |
diff --git a/server/lib/notifier/shared/abuse/new-abuse-for-moderators.ts b/server/lib/notifier/shared/abuse/new-abuse-for-moderators.ts index c3c7c5515..7d86fb55f 100644 --- a/server/lib/notifier/shared/abuse/new-abuse-for-moderators.ts +++ b/server/lib/notifier/shared/abuse/new-abuse-for-moderators.ts | |||
@@ -28,8 +28,8 @@ export class NewAbuseForModerators extends AbstractNotification <NewAbusePayload | |||
28 | return this.moderators | 28 | return this.moderators |
29 | } | 29 | } |
30 | 30 | ||
31 | async createNotification (user: MUserWithNotificationSetting) { | 31 | createNotification (user: MUserWithNotificationSetting) { |
32 | const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ | 32 | const notification = UserNotificationModel.build<UserNotificationModelForApi>({ |
33 | type: UserNotificationType.NEW_ABUSE_FOR_MODERATORS, | 33 | type: UserNotificationType.NEW_ABUSE_FOR_MODERATORS, |
34 | userId: user.id, | 34 | userId: user.id, |
35 | abuseId: this.payload.abuseInstance.id | 35 | abuseId: this.payload.abuseInstance.id |