Use unique AP id for accept/reject

This commit is contained in:
Chocobozzz 2022-07-25 11:24:05 +02:00
parent 051d69a005
commit 9e2a4af3a0
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 7 deletions

View File

@ -15,7 +15,7 @@ function sendReject (followUrl: string, follower: MActor, following: MActor) {
const followData = buildFollowActivity(followUrl, follower, following)
const url = getLocalActorFollowRejectActivityPubUrl(follower, following)
const url = getLocalActorFollowRejectActivityPubUrl()
const data = buildRejectActivity(url, following, followData)
return unicastTo({ data, byActor: following, toActorUrl: follower.inboxUrl, contextType: 'Reject' })

View File

@ -93,14 +93,11 @@ function getLocalActorFollowActivityPubUrl (follower: MActor, following: MActorI
}
function getLocalActorFollowAcceptActivityPubUrl (actorFollow: MActorFollowActors) {
const follower = actorFollow.ActorFollower
const me = actorFollow.ActorFollowing
return WEBSERVER.URL + '/accepts/follows/' + follower.id + '/' + me.id
return WEBSERVER.URL + '/accepts/follows/' + actorFollow.id
}
function getLocalActorFollowRejectActivityPubUrl (follower: MActorId, following: MActorId) {
return WEBSERVER.URL + '/rejects/follows/' + follower.id + '/' + following.id
function getLocalActorFollowRejectActivityPubUrl () {
return WEBSERVER.URL + '/rejects/follows/' + new Date().toISOString()
}
function getLocalVideoAnnounceActivityPubUrl (byActor: MActorId, video: MVideoUrl) {