aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/actor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/actor.ts')
-rw-r--r--server/lib/activitypub/actor.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 13b73077e..cad9af5e0 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -163,9 +163,12 @@ async function updateActorInstance (actorInstance: ActorModel, attributes: Activ
163 actorInstance.followingCount = followingCount 163 actorInstance.followingCount = followingCount
164 actorInstance.inboxUrl = attributes.inbox 164 actorInstance.inboxUrl = attributes.inbox
165 actorInstance.outboxUrl = attributes.outbox 165 actorInstance.outboxUrl = attributes.outbox
166 actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox
167 actorInstance.followersUrl = attributes.followers 166 actorInstance.followersUrl = attributes.followers
168 actorInstance.followingUrl = attributes.following 167 actorInstance.followingUrl = attributes.following
168
169 if (attributes.endpoints && attributes.endpoints.sharedInbox) {
170 actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox
171 }
169} 172}
170 173
171type AvatarInfo = { name: string, onDisk: boolean, fileUrl: string } 174type AvatarInfo = { name: string, onDisk: boolean, fileUrl: string }
@@ -437,9 +440,12 @@ async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode?: numbe
437 followingCount: followingCount, 440 followingCount: followingCount,
438 inboxUrl: actorJSON.inbox, 441 inboxUrl: actorJSON.inbox,
439 outboxUrl: actorJSON.outbox, 442 outboxUrl: actorJSON.outbox,
440 sharedInboxUrl: actorJSON.endpoints.sharedInbox,
441 followersUrl: actorJSON.followers, 443 followersUrl: actorJSON.followers,
442 followingUrl: actorJSON.following 444 followingUrl: actorJSON.following,
445
446 sharedInboxUrl: actorJSON.endpoints && actorJSON.endpoints.sharedInbox
447 ? actorJSON.endpoints.sharedInbox
448 : null,
443 }) 449 })
444 450
445 const avatarInfo = await getAvatarInfoIfExists(actorJSON) 451 const avatarInfo = await getAvatarInfoIfExists(actorJSON)