Type toFormattedJSON
This commit is contained in:
parent
0283eaac2a
commit
1ca9f7c3f7
54 changed files with 401 additions and 147 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue