]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-accept.ts
Add subscriptions endpoints to REST API
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-accept.ts
index dfee1ec3e9bf255d95f56740cca996623590bd0e..ef679707bfe72df3d9332f531e8ee6691da53d2a 100644 (file)
@@ -10,6 +10,11 @@ async function sendAccept (actorFollow: ActorFollowModel) {
   const follower = actorFollow.ActorFollower
   const me = actorFollow.ActorFollowing
 
+  if (!follower.serverId) { // This should never happen
+    logger.warn('Do not sending accept to local follower.')
+    return
+  }
+
   logger.info('Creating job to accept follower %s.', follower.url)
 
   const followUrl = getActorFollowActivityPubUrl(actorFollow)