]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/actor.ts
Remove uneccessary details to link titles
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / actor.ts
index c743dcf3f4a2117aa85da6a28398ac56350b2e31..0e5742071e3fd35b8965568a2aefca8bc8e7d1d3 100644 (file)
@@ -166,7 +166,7 @@ async function updateActorInstance (actorInstance: ActorModel, attributes: Activ
   actorInstance.followersUrl = attributes.followers
   actorInstance.followingUrl = attributes.following
 
-  if (attributes.endpoints && attributes.endpoints.sharedInbox) {
+  if (attributes.endpoints?.sharedInbox) {
     actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox
   }
 }
@@ -457,7 +457,7 @@ async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode?: numbe
     followersUrl: actorJSON.followers,
     followingUrl: actorJSON.following,
 
-    sharedInboxUrl: actorJSON.endpoints && actorJSON.endpoints.sharedInbox
+    sharedInboxUrl: actorJSON.endpoints?.sharedInbox
       ? actorJSON.endpoints.sharedInbox
       : null
   })