aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/notifier/shared/video-publication
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-03 11:33:43 +0200
committerChocobozzz <me@florianbigard.com>2022-08-03 11:33:43 +0200
commit785f1897a42984ece9c6f65829d195d67e331d95 (patch)
tree1cb3b33cfc797b8f1abbab90749c1e3187bbd311 /server/lib/notifier/shared/video-publication
parent0260dc8aca952f9412a8620e433b9e16e675696e (diff)
downloadPeerTube-785f1897a42984ece9c6f65829d195d67e331d95.tar.gz
PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.tar.zst
PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.zip
Add notification plugin hook
Diffstat (limited to 'server/lib/notifier/shared/video-publication')
-rw-r--r--server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts4
-rw-r--r--server/lib/notifier/shared/video-publication/import-finished-for-owner.ts4
-rw-r--r--server/lib/notifier/shared/video-publication/new-video-for-subscribers.ts4
-rw-r--r--server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts4
4 files changed, 8 insertions, 8 deletions
diff --git a/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts b/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts
index 37435f898..a940cde69 100644
--- a/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts
+++ b/server/lib/notifier/shared/video-publication/abstract-owned-video-publication.ts
@@ -27,8 +27,8 @@ export abstract class AbstractOwnedVideoPublication extends AbstractNotification
27 return [ this.user ] 27 return [ this.user ]
28 } 28 }
29 29
30 async createNotification (user: MUserWithNotificationSetting) { 30 createNotification (user: MUserWithNotificationSetting) {
31 const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ 31 const notification = UserNotificationModel.build<UserNotificationModelForApi>({
32 type: UserNotificationType.MY_VIDEO_PUBLISHED, 32 type: UserNotificationType.MY_VIDEO_PUBLISHED,
33 userId: user.id, 33 userId: user.id,
34 videoId: this.payload.id 34 videoId: this.payload.id
diff --git a/server/lib/notifier/shared/video-publication/import-finished-for-owner.ts b/server/lib/notifier/shared/video-publication/import-finished-for-owner.ts
index 9f374b6f9..3bd64692f 100644
--- a/server/lib/notifier/shared/video-publication/import-finished-for-owner.ts
+++ b/server/lib/notifier/shared/video-publication/import-finished-for-owner.ts
@@ -32,8 +32,8 @@ export class ImportFinishedForOwner extends AbstractNotification <ImportFinished
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: this.payload.success 37 type: this.payload.success
38 ? UserNotificationType.MY_VIDEO_IMPORT_SUCCESS 38 ? UserNotificationType.MY_VIDEO_IMPORT_SUCCESS
39 : UserNotificationType.MY_VIDEO_IMPORT_ERROR, 39 : UserNotificationType.MY_VIDEO_IMPORT_ERROR,
diff --git a/server/lib/notifier/shared/video-publication/new-video-for-subscribers.ts b/server/lib/notifier/shared/video-publication/new-video-for-subscribers.ts
index 4253a0930..df7a5561d 100644
--- a/server/lib/notifier/shared/video-publication/new-video-for-subscribers.ts
+++ b/server/lib/notifier/shared/video-publication/new-video-for-subscribers.ts
@@ -30,8 +30,8 @@ export class NewVideoForSubscribers extends AbstractNotification <MVideoAccountL
30 return this.users 30 return this.users
31 } 31 }
32 32
33 async createNotification (user: MUserWithNotificationSetting) { 33 createNotification (user: MUserWithNotificationSetting) {
34 const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ 34 const notification = UserNotificationModel.build<UserNotificationModelForApi>({
35 type: UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION, 35 type: UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION,
36 userId: user.id, 36 userId: user.id,
37 videoId: this.payload.id 37 videoId: this.payload.id
diff --git a/server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts b/server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts
index ee3027245..f36399f05 100644
--- a/server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts
+++ b/server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts
@@ -27,8 +27,8 @@ export class StudioEditionFinishedForOwner extends AbstractNotification <MVideoF
27 return [ this.user ] 27 return [ this.user ]
28 } 28 }
29 29
30 async createNotification (user: MUserWithNotificationSetting) { 30 createNotification (user: MUserWithNotificationSetting) {
31 const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ 31 const notification = UserNotificationModel.build<UserNotificationModelForApi>({
32 type: UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED, 32 type: UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED,
33 userId: user.id, 33 userId: user.id,
34 videoId: this.payload.id 34 videoId: this.payload.id