mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Fix incorrect IDs in AP federation
This commit is contained in:
parent
3fba4b6bce
commit
de94ac86a2
34 changed files with 281 additions and 236 deletions
|
@ -1,9 +1,9 @@
|
|||
import { ActivityAccept, ActivityFollow } from '../../../../shared/models/activitypub'
|
||||
import { getActorFollowAcceptActivityPubUrl, getActorFollowActivityPubUrl } from '../url'
|
||||
import { unicastTo } from './utils'
|
||||
import { buildFollowActivity } from './send-follow'
|
||||
import { logger } from '../../../helpers/logger'
|
||||
import { MActor, MActorFollowActors } from '../../../types/models'
|
||||
import { getLocalActorFollowAcceptActivityPubUrl } from '../url'
|
||||
import { buildFollowActivity } from './send-follow'
|
||||
import { unicastTo } from './utils'
|
||||
|
||||
function sendAccept (actorFollow: MActorFollowActors) {
|
||||
const follower = actorFollow.ActorFollower
|
||||
|
@ -16,10 +16,9 @@ function sendAccept (actorFollow: MActorFollowActors) {
|
|||
|
||||
logger.info('Creating job to accept follower %s.', follower.url)
|
||||
|
||||
const followUrl = getActorFollowActivityPubUrl(follower, me)
|
||||
const followData = buildFollowActivity(followUrl, follower, me)
|
||||
const followData = buildFollowActivity(actorFollow.url, follower, me)
|
||||
|
||||
const url = getActorFollowAcceptActivityPubUrl(actorFollow)
|
||||
const url = getLocalActorFollowAcceptActivityPubUrl(actorFollow)
|
||||
const data = buildAcceptActivity(url, me, followData)
|
||||
|
||||
return unicastTo(data, me, follower.inboxUrl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue