]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier/shared/abuse/abuse-state-change-for-reporter.ts
Add notification plugin hook
[github/Chocobozzz/PeerTube.git] / server / lib / notifier / shared / abuse / abuse-state-change-for-reporter.ts
index d92f7a13ba701100903675a55b3e560ea91e391e..97e896c6a667f6a119b31f7b9f293dcc76795c02 100644 (file)
@@ -32,8 +32,8 @@ export class AbuseStateChangeForReporter extends AbstractNotification <MAbuseFul
     return [ this.user ]
   }
 
-  async createNotification (user: MUserWithNotificationSetting) {
-    const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
+  createNotification (user: MUserWithNotificationSetting) {
+    const notification = UserNotificationModel.build<UserNotificationModelForApi>({
       type: UserNotificationType.ABUSE_STATE_CHANGE,
       userId: user.id,
       abuseId: this.abuse.id