X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Factivitypub%2Factor.ts;h=05de1905d57a1eb6401bb98e498660089adfb73f;hb=8424c4026afd7304880a4ce8138a04ffb3d8c938;hp=67a1b5bc1b55b9607da7f29708123cdab31f6260;hpb=282e61e6c11f79e919c543871783fe1a00298d18;p=github%2FChocobozzz%2FPeerTube.git 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(),