]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier/shared/abuse/abstract-new-abuse-message.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / server / lib / notifier / shared / abuse / abstract-new-abuse-message.ts
index daefa25bd6d6d859ac9a5a254bbf0478c7fd22b2..1dc1ccfc2359b12d487f6e661a03afe71fd14cbe 100644 (file)
@@ -5,7 +5,7 @@ import { MAbuseFull, MAbuseMessage, MAccountDefault, MUserWithNotificationSettin
 import { UserNotificationType } from '@shared/models'
 import { AbstractNotification } from '../common/abstract-notification'
 
-export type NewAbuseMessagePayload = {
+type NewAbuseMessagePayload = {
   abuse: MAbuseFull
   message: MAbuseMessage
 }
@@ -21,8 +21,8 @@ export abstract class AbstractNewAbuseMessage extends AbstractNotification <NewA
     return user.NotificationSetting.abuseNewMessage
   }
 
-  async createNotification (user: MUserWithNotificationSetting) {
-    const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
+  createNotification (user: MUserWithNotificationSetting) {
+    const notification = UserNotificationModel.build<UserNotificationModelForApi>({
       type: UserNotificationType.ABUSE_NEW_MESSAGE,
       userId: user.id,
       abuseId: this.abuse.id