X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fcontext.ts;h=5d6aee315161e30a4993dd20d94f0280c00ffa25;hb=bd911b54b555b11df7e9849cf92d358bccfecf6e;hp=3bc40e2aa2749114f9786d0b40a76948776bfd03;hpb=a219c9100b3ce8774d454497d46be87465bf664e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/context.ts b/server/lib/activitypub/context.ts index 3bc40e2aa..5d6aee315 100644 --- a/server/lib/activitypub/context.ts +++ b/server/lib/activitypub/context.ts @@ -15,7 +15,7 @@ export { type ContextValue = { [ id: string ]: (string | { '@type': string, '@id': string }) } -const contextStore = { +const contextStore: { [ id in ContextType ]: (string | { [ id: string ]: string })[] } = { Video: buildContext({ Hashtag: 'as:Hashtag', uuid: 'sc:identifier', @@ -109,7 +109,8 @@ const contextStore = { stopTimestamp: { '@type': 'sc:Number', '@id': 'pt:stopTimestamp' - } + }, + uuid: 'sc:identifier' }), CacheFile: buildContext({ @@ -128,6 +129,24 @@ const contextStore = { } }), + WatchAction: buildContext({ + WatchAction: 'sc:WatchAction', + startTimestamp: { + '@type': 'sc:Number', + '@id': 'pt:startTimestamp' + }, + stopTimestamp: { + '@type': 'sc:Number', + '@id': 'pt:stopTimestamp' + }, + watchSection: { + '@type': 'sc:Number', + '@id': 'pt:stopTimestamp' + }, + uuid: 'sc:identifier' + }), + + Collection: buildContext(), Follow: buildContext(), Reject: buildContext(), Accept: buildContext(), @@ -160,7 +179,7 @@ function buildContext (contextValue?: ContextValue) { { pt: 'https://joinpeertube.org/ns#', - sc: 'http://schema.org#', + sc: 'http://schema.org/', ...contextValue }