From 8424c4026afd7304880a4ce8138a04ffb3d8c938 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Aug 2019 16:50:12 +0200 Subject: Add auto follow back support for instances --- server/models/activitypub/actor.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'server/models/activitypub') diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index 67a1b5bc1..05de1905d 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts @@ -43,7 +43,6 @@ import { MActorFormattable, MActorFull, MActorHost, - MActorRedundancyAllowedOpt, MActorServer, MActorSummaryFormattable } from '../../typings/models' @@ -430,15 +429,8 @@ export class ActorModel extends Model { }) } - toActivityPubObject (this: MActorAP, name: string, type: 'Account' | 'Application' | 'VideoChannel') { + toActivityPubObject (this: MActorAP, name: string) { let activityPubType - if (type === 'Account') { - activityPubType = 'Person' as 'Person' - } else if (type === 'Application') { - activityPubType = 'Application' as 'Application' - } else { // VideoChannel - activityPubType = 'Group' as 'Group' - } let icon = undefined if (this.avatarId) { @@ -451,7 +443,7 @@ export class ActorModel extends Model { } const json = { - type: activityPubType, + type: this.type, id: this.url, following: this.getFollowingUrl(), followers: this.getFollowersUrl(), -- cgit v1.2.3