aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-10 15:08:56 +0100
committerChocobozzz <me@florianbigard.com>2023-03-10 15:19:33 +0100
commit96d00a997b9847f6796c02dbff01bca2c99385c6 (patch)
treedb3048042f83b0b5f529bdb4723f1f99202c3a96 /server/tests/fixtures/peertube-plugin-test
parent866b5d3f5230204d611a556260102996c1aefe10 (diff)
downloadPeerTube-96d00a997b9847f6796c02dbff01bca2c99385c6.tar.gz
PeerTube-96d00a997b9847f6796c02dbff01bca2c99385c6.tar.zst
PeerTube-96d00a997b9847f6796c02dbff01bca2c99385c6.zip
Add test on AP hooks
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js12
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 8b918b634..89ca52625 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -208,6 +208,18 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
208 // --------------------------------------------------------------------------- 208 // ---------------------------------------------------------------------------
209 209
210 registerHook({ 210 registerHook({
211 target: 'filter:activity-pub.activity.context.build.result',
212 handler: context => context.concat([ 'https://example.com/new-context' ])
213 })
214
215 registerHook({
216 target: 'filter:activity-pub.video.json-ld.build.result',
217 handler: (jsonld, { video }) => ({ ...jsonld, videoName: video.name })
218 })
219
220 // ---------------------------------------------------------------------------
221
222 registerHook({
211 target: 'filter:api.video-threads.list.params', 223 target: 'filter:api.video-threads.list.params',
212 handler: obj => addToCount(obj) 224 handler: obj => addToCount(obj)
213 }) 225 })