diff options
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test/main.js')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test/main.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js index 17032f6d9..e16bf0ca3 100644 --- a/server/tests/fixtures/peertube-plugin-test/main.js +++ b/server/tests/fixtures/peertube-plugin-test/main.js | |||
@@ -9,6 +9,8 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
9 | 'action:api.video.uploaded', | 9 | 'action:api.video.uploaded', |
10 | 'action:api.video.viewed', | 10 | 'action:api.video.viewed', |
11 | 11 | ||
12 | 'action:api.video.file-updated', | ||
13 | |||
12 | 'action:api.video-channel.created', | 14 | 'action:api.video-channel.created', |
13 | 'action:api.video-channel.updated', | 15 | 'action:api.video-channel.updated', |
14 | 'action:api.video-channel.deleted', | 16 | 'action:api.video-channel.deleted', |
@@ -161,6 +163,16 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
161 | } | 163 | } |
162 | 164 | ||
163 | registerHook({ | 165 | registerHook({ |
166 | target: 'filter:api.video.update-file.accept.result', | ||
167 | handler: ({ accepted }, { videoFile }) => { | ||
168 | if (!accepted) return { accepted: false } | ||
169 | if (videoFile.filename.includes('webm')) return { accepted: false, errorMessage: 'no webm' } | ||
170 | |||
171 | return { accepted: true } | ||
172 | } | ||
173 | }) | ||
174 | |||
175 | registerHook({ | ||
164 | target: 'filter:api.video.pre-import-url.accept.result', | 176 | target: 'filter:api.video.pre-import-url.accept.result', |
165 | handler: ({ accepted }, { videoImportBody }) => { | 177 | handler: ({ accepted }, { videoImportBody }) => { |
166 | if (!accepted) return { accepted: false } | 178 | if (!accepted) return { accepted: false } |