]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/actor.ts
Add check constraints live tests
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / actor.ts
index c743dcf3f4a2117aa85da6a28398ac56350b2e31..73406e248997b9c374b55c1ff59d8e597c394b99 100644 (file)
@@ -33,7 +33,7 @@ import {
   MActorFullActor,
   MActorId,
   MChannel
-} from '../../typings/models'
+} from '../../types/models'
 import { extname } from 'path'
 import { getServerActor } from '@server/models/application/application'
 
@@ -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
   })