aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-30 16:50:12 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-09-04 16:24:58 +0200
commit8424c4026afd7304880a4ce8138a04ffb3d8c938 (patch)
tree5b42625a59307b03333aa7d293b40b4c90da8f73 /server/models/activitypub
parentf69ec5f340638ef577e8f5b9b1fb844778656a1f (diff)
downloadPeerTube-8424c4026afd7304880a4ce8138a04ffb3d8c938.tar.gz
PeerTube-8424c4026afd7304880a4ce8138a04ffb3d8c938.tar.zst
PeerTube-8424c4026afd7304880a4ce8138a04ffb3d8c938.zip
Add auto follow back support for instances
Diffstat (limited to 'server/models/activitypub')
-rw-r--r--server/models/activitypub/actor.ts12
1 files changed, 2 insertions, 10 deletions
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 {
43 MActorFormattable, 43 MActorFormattable,
44 MActorFull, 44 MActorFull,
45 MActorHost, 45 MActorHost,
46 MActorRedundancyAllowedOpt,
47 MActorServer, 46 MActorServer,
48 MActorSummaryFormattable 47 MActorSummaryFormattable
49} from '../../typings/models' 48} from '../../typings/models'
@@ -430,15 +429,8 @@ export class ActorModel extends Model<ActorModel> {
430 }) 429 })
431 } 430 }
432 431
433 toActivityPubObject (this: MActorAP, name: string, type: 'Account' | 'Application' | 'VideoChannel') { 432 toActivityPubObject (this: MActorAP, name: string) {
434 let activityPubType 433 let activityPubType
435 if (type === 'Account') {
436 activityPubType = 'Person' as 'Person'
437 } else if (type === 'Application') {
438 activityPubType = 'Application' as 'Application'
439 } else { // VideoChannel
440 activityPubType = 'Group' as 'Group'
441 }
442 434
443 let icon = undefined 435 let icon = undefined
444 if (this.avatarId) { 436 if (this.avatarId) {
@@ -451,7 +443,7 @@ export class ActorModel extends Model<ActorModel> {
451 } 443 }
452 444
453 const json = { 445 const json = {
454 type: activityPubType, 446 type: this.type,
455 id: this.url, 447 id: this.url,
456 following: this.getFollowingUrl(), 448 following: this.getFollowingUrl(),
457 followers: this.getFollowersUrl(), 449 followers: this.getFollowersUrl(),