The livechat plugin broke the federation with Peertube >= 6.1.0.

This commit is contained in:
John Livingston
2024-05-05 12:47:33 +02:00
parent 73afc41eda
commit a026c57cc3
3 changed files with 37 additions and 13 deletions

View File

@ -1,6 +1,6 @@
import type { RegisterServerOptions, VideoObject } from '@peertube/peertube-types'
import type { VideoBuildResultContext, RemoteVideoHandlerParams } from './types'
import { videoBuildJSONLD } from './outgoing'
import { videoBuildJSONLD, videoContextBuildJSONLD } from './outgoing'
import { readIncomingAPVideo } from './incoming'
export async function initFederation (options: RegisterServerOptions): Promise<void> {
@ -15,13 +15,12 @@ export async function initFederation (options: RegisterServerOptions): Promise<v
}
})
// TODO: we should also register the context.build hook.
// registerHook({
// target: 'filter:activity-pub.activity.context.build.result',
// handler: (jsonld: any) => {
// return videoContectBuildJSONLD(options, jsonld)
// }
// })
registerHook({
target: 'filter:activity-pub.activity.context.build.result',
handler: async (jsonld: any) => {
return videoContextBuildJSONLD(options, jsonld)
}
})
registerHook({
target: 'action:activity-pub.remote-video.created',