X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Frequests%2Factivitypub.ts;h=ecd8ce82389d5e31de01fbd78922992c07cb594c;hb=e7053b1d9d7f77d0375155b38d3e845f2163ecd8;hp=2a7f20289ff52492a5060c3a8647392805162897;hpb=266131e0ca2f2622bbb15299212f00b1efa36867;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/requests/activitypub.ts b/shared/extra-utils/requests/activitypub.ts index 2a7f20289..ecd8ce823 100644 --- a/shared/extra-utils/requests/activitypub.ts +++ b/shared/extra-utils/requests/activitypub.ts @@ -17,7 +17,7 @@ function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: async function makeFollowRequest (to: { url: string }, by: { url: string, privateKey }) { const follow = { type: 'Follow', - id: by.url + '/toto', + id: by.url + '/' + new Date().getTime(), actor: by.url, object: to.url } @@ -33,7 +33,7 @@ async function makeFollowRequest (to: { url: string }, by: { url: string, privat } const headers = buildGlobalHeaders(body) - return makePOSTAPRequest(to.url, body, httpSignature, headers) + return makePOSTAPRequest(to.url + '/inbox', body, httpSignature, headers) } export {