]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/actor.ts
Handle reports from mastodon
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / actor.ts
index 5201bdeef392a2ed0c948495b56749f2a5f92877..13b73077e8ca6d6e757f09d92ac264fb3f5d97ec 100644 (file)
@@ -38,7 +38,7 @@ import {
 } from '../../typings/models'
 
 // Set account keys, this could be long so process after the account creation and do not block the client
-function setAsyncActorKeys (actor: MActor) {
+function setAsyncActorKeys <T extends MActor> (actor: T) {
   return createPrivateAndPublicKeys()
     .then(({ publicKey, privateKey }) => {
       actor.publicKey = publicKey
@@ -148,7 +148,7 @@ function buildActorInstance (type: ActivityPubActorType, url: string, preferredU
     sharedInboxUrl: WEBSERVER.URL + '/inbox',
     followersUrl: url + '/followers',
     followingUrl: url + '/following'
-  })
+  }) as MActor
 }
 
 async function updateActorInstance (actorInstance: ActorModel, attributes: ActivityPubActor) {