diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-03 11:33:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-03 11:33:43 +0200 |
commit | 785f1897a42984ece9c6f65829d195d67e331d95 (patch) | |
tree | 1cb3b33cfc797b8f1abbab90749c1e3187bbd311 /server/lib/notifier/shared/comment | |
parent | 0260dc8aca952f9412a8620e433b9e16e675696e (diff) | |
download | PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.tar.gz PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.tar.zst PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.zip |
Add notification plugin hook
Diffstat (limited to 'server/lib/notifier/shared/comment')
-rw-r--r-- | server/lib/notifier/shared/comment/comment-mention.ts | 4 | ||||
-rw-r--r-- | server/lib/notifier/shared/comment/new-comment-for-video-owner.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/notifier/shared/comment/comment-mention.ts b/server/lib/notifier/shared/comment/comment-mention.ts index ecd1687b4..3074e97db 100644 --- a/server/lib/notifier/shared/comment/comment-mention.ts +++ b/server/lib/notifier/shared/comment/comment-mention.ts | |||
@@ -71,8 +71,8 @@ export class CommentMention extends AbstractNotification <MCommentOwnerVideo, MU | |||
71 | return this.users | 71 | return this.users |
72 | } | 72 | } |
73 | 73 | ||
74 | async createNotification (user: MUserWithNotificationSetting) { | 74 | createNotification (user: MUserWithNotificationSetting) { |
75 | const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ | 75 | const notification = UserNotificationModel.build<UserNotificationModelForApi>({ |
76 | type: UserNotificationType.COMMENT_MENTION, | 76 | type: UserNotificationType.COMMENT_MENTION, |
77 | userId: user.id, | 77 | userId: user.id, |
78 | commentId: this.payload.id | 78 | commentId: this.payload.id |
diff --git a/server/lib/notifier/shared/comment/new-comment-for-video-owner.ts b/server/lib/notifier/shared/comment/new-comment-for-video-owner.ts index 757502703..4f96439a3 100644 --- a/server/lib/notifier/shared/comment/new-comment-for-video-owner.ts +++ b/server/lib/notifier/shared/comment/new-comment-for-video-owner.ts | |||
@@ -38,8 +38,8 @@ export class NewCommentForVideoOwner extends AbstractNotification <MCommentOwner | |||
38 | return [ this.user ] | 38 | return [ this.user ] |
39 | } | 39 | } |
40 | 40 | ||
41 | async createNotification (user: MUserWithNotificationSetting) { | 41 | createNotification (user: MUserWithNotificationSetting) { |
42 | const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ | 42 | const notification = UserNotificationModel.build<UserNotificationModelForApi>({ |
43 | type: UserNotificationType.NEW_COMMENT_ON_MY_VIDEO, | 43 | type: UserNotificationType.NEW_COMMENT_ON_MY_VIDEO, |
44 | userId: user.id, | 44 | userId: user.id, |
45 | commentId: this.payload.id | 45 | commentId: this.payload.id |