]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/notifier/shared/comment/comment-mention.ts
Add notification plugin hook
[github/Chocobozzz/PeerTube.git] / server / lib / notifier / shared / comment / comment-mention.ts
index 765cbaad95fecff738cabd260eadaa4f5329c765..3074e97db6a55b0c36ebe43bef0728a85d15cb75 100644 (file)
@@ -71,13 +71,13 @@ export class CommentMention extends AbstractNotification <MCommentOwnerVideo, MU
     return this.users
   }
 
-  async createNotification (user: MUserWithNotificationSetting) {
-    const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
+  createNotification (user: MUserWithNotificationSetting) {
+    const notification = UserNotificationModel.build<UserNotificationModelForApi>({
       type: UserNotificationType.COMMENT_MENTION,
       userId: user.id,
       commentId: this.payload.id
     })
-    notification.Comment = this.payload
+    notification.VideoComment = this.payload
 
     return notification
   }