aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/send/send-follow.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
committerChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
commitde94ac86a211dec657332d964693857ec235ce40 (patch)
tree3bff96a40e7c862d83561a26249992b07331b0a2 /server/lib/activitypub/send/send-follow.ts
parent3fba4b6bce69247b1d37f923894d8f44818a891c (diff)
downloadPeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.gz
PeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.zst
PeerTube-de94ac86a211dec657332d964693857ec235ce40.zip
Fix incorrect IDs in AP federation
Diffstat (limited to 'server/lib/activitypub/send/send-follow.ts')
-rw-r--r--server/lib/activitypub/send/send-follow.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts
index 08f1d83f9..9219640dd 100644
--- a/server/lib/activitypub/send/send-follow.ts
+++ b/server/lib/activitypub/send/send-follow.ts
@@ -1,9 +1,8 @@
1import { Transaction } from 'sequelize'
1import { ActivityFollow } from '../../../../shared/models/activitypub' 2import { ActivityFollow } from '../../../../shared/models/activitypub'
2import { getActorFollowActivityPubUrl } from '../url'
3import { unicastTo } from './utils'
4import { logger } from '../../../helpers/logger' 3import { logger } from '../../../helpers/logger'
5import { Transaction } from 'sequelize'
6import { MActor, MActorFollowActors } from '../../../types/models' 4import { MActor, MActorFollowActors } from '../../../types/models'
5import { unicastTo } from './utils'
7 6
8function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { 7function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
9 const me = actorFollow.ActorFollower 8 const me = actorFollow.ActorFollower
@@ -14,8 +13,7 @@ function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
14 13
15 logger.info('Creating job to send follow request to %s.', following.url) 14 logger.info('Creating job to send follow request to %s.', following.url)
16 15
17 const url = getActorFollowActivityPubUrl(me, following) 16 const data = buildFollowActivity(actorFollow.url, me, following)
18 const data = buildFollowActivity(url, me, following)
19 17
20 t.afterCommit(() => unicastTo(data, me, following.inboxUrl)) 18 t.afterCommit(() => unicastTo(data, me, following.inboxUrl))
21} 19}