]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/plugins/server-hook.model.ts
Handle unavailable videos in embed playlists
[github/Chocobozzz/PeerTube.git] / shared / models / plugins / server-hook.model.ts
index 32c7f4688906d9eca48dddc2492d2c5d4d725ec9..5f812904fbf53f7ae80e366d43a4575bfaad721e 100644 (file)
@@ -9,9 +9,13 @@ export const serverFilterHookObject = {
   // Used to get detailed video information (video watch page for example)
   'filter:api.video.get.result': true,
 
-  // Filter the result of the accept upload function
+  // Filter the result of the accept upload, import via torrent or url functions
   // If this function returns false then the upload is aborted with an error
   'filter:api.video.upload.accept.result': true,
+  'filter:api.video.pre-import-url.accept.result': true,
+  'filter:api.video.pre-import-torrent.accept.result': true,
+  'filter:api.video.post-import-url.accept.result': true,
+  'filter:api.video.post-import-torrent.accept.result': true,
   // Filter the result of the accept comment (thread or reply) functions
   // If the functions return false then the user cannot post its comment
   'filter:api.video-thread.create.accept.result': true,
@@ -29,7 +33,10 @@ export const serverFilterHookObject = {
 
   // Filter result used to check if we need to auto blacklist a video
   // (fired when a local or remote video is created or updated)
-  'filter:video.auto-blacklist.result': true
+  'filter:video.auto-blacklist.result': true,
+
+  // Filter result used to check if a user can register on the instance
+  'filter:api.user.signup.allowed.result': true
 }
 
 export type ServerFilterHookName = keyof typeof serverFilterHookObject
@@ -52,7 +59,23 @@ export const serverActionHookObject = {
   // Fired when a reply to a thread is created
   'action:api.video-comment-reply.created': true,
   // Fired when a comment (thread or reply) is deleted
-  'action:api.video-comment.deleted': true
+  'action:api.video-comment.deleted': true,
+
+  // Fired when a user is blocked (banned)
+  'action:api.user.blocked': true,
+  // Fired when a user is unblocked (unbanned)
+  'action:api.user.unblocked': true,
+  // Fired when a user registered on the instance
+  'action:api.user.registered': true,
+  // Fired when an admin/moderator created a user
+  'action:api.user.created': true,
+  // Fired when a user is removed by an admin/moderator
+  'action:api.user.deleted': true,
+  // Fired when a user is updated by an admin/moderator
+  'action:api.user.updated': true,
+
+  // Fired when a user got a new oauth2 token
+  'action:api.user.oauth2-got-token': true
 }
 
 export type ServerActionHookName = keyof typeof serverActionHookObject