From b5fecbf44192144d1ca27c23a0b53922de288c10 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 21 Aug 2019 14:31:57 +0200 Subject: Type toActivityPubObject functions --- server/models/activitypub/actor.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'server/models/activitypub/actor.ts') diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index e2213afa1..fb4327e4f 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts @@ -39,12 +39,13 @@ import { VideoModel } from '../video/video' import { MActor, MActorAccountChannelId, + MActorAP, MActorFormattable, - MActorFull, MActorHost, + MActorFull, + MActorHost, + MActorRedundancyAllowedOpt, MActorServer, - MActorSummaryFormattable, - MServerHost, - MActorRedundancyAllowed + MActorSummaryFormattable } from '../../typings/models' import * as Bluebird from 'bluebird' @@ -429,7 +430,7 @@ export class ActorModel extends Model { }) } - toActivityPubObject (name: string, type: 'Account' | 'Application' | 'VideoChannel') { + toActivityPubObject (this: MActorAP, name: string, type: 'Account' | 'Application' | 'VideoChannel') { let activityPubType if (type === 'Account') { activityPubType = 'Person' as 'Person' @@ -528,7 +529,7 @@ export class ActorModel extends Model { return this.Server ? this.Server.host : WEBSERVER.HOST } - getRedundancyAllowed (this: MActorRedundancyAllowed) { + getRedundancyAllowed () { return this.Server ? this.Server.redundancyAllowed : false } -- cgit v1.2.3