aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
index 84b479548..36dd08d27 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -312,6 +312,8 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
312 } 312 }
313 }) 313 })
314 314
315 // ---------------------------------------------------------------------------
316
315 registerHook({ 317 registerHook({
316 target: 'filter:html.embed.video.allowed.result', 318 target: 'filter:html.embed.video.allowed.result',
317 handler: (result, params) => { 319 handler: (result, params) => {
@@ -332,6 +334,19 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
332 } 334 }
333 }) 335 })
334 336
337 // ---------------------------------------------------------------------------
338
339 registerHook({
340 target: 'filter:html.client.json-ld.result',
341 handler: (jsonld, context) => {
342 if (!context || !context.video) return jsonld
343
344 return Object.assign(jsonld, { recordedAt: 'http://example.com/recordedAt' })
345 }
346 })
347
348 // ---------------------------------------------------------------------------
349
335 registerHook({ 350 registerHook({
336 target: 'filter:api.server.stats.get.result', 351 target: 'filter:api.server.stats.get.result',
337 handler: (result) => { 352 handler: (result) => {