]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/send/send-follow.ts
Fix redundancy federation in some cases
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / send / send-follow.ts
index 08f1d83f98b9a592097086a40aecd2768a3ccda7..9219640ddaae85cb8733e5c5ff6d44d7a78b02ca 100644 (file)
@@ -1,9 +1,8 @@
+import { Transaction } from 'sequelize'
 import { ActivityFollow } from '../../../../shared/models/activitypub'
-import { getActorFollowActivityPubUrl } from '../url'
-import { unicastTo } from './utils'
 import { logger } from '../../../helpers/logger'
-import { Transaction } from 'sequelize'
 import { MActor, MActorFollowActors } from '../../../types/models'
+import { unicastTo } from './utils'
 
 function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
   const me = actorFollow.ActorFollower
@@ -14,8 +13,7 @@ function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
 
   logger.info('Creating job to send follow request to %s.', following.url)
 
-  const url = getActorFollowActivityPubUrl(me, following)
-  const data = buildFollowActivity(url, me, following)
+  const data = buildFollowActivity(actorFollow.url, me, following)
 
   t.afterCommit(() => unicastTo(data, me, following.inboxUrl))
 }