Type toFormattedJSON

This commit is contained in:
Chocobozzz 2019-08-20 19:05:31 +02:00
parent 0283eaac2a
commit 1ca9f7c3f7
No known key found for this signature in database
GPG key ID: 583A612D890159BE
54 changed files with 401 additions and 147 deletions

View 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) {