Verified Commit 9e2a4af3 authored by Chocobozzz's avatar Chocobozzz
Browse files

Use unique AP id for accept/reject

parent 051d69a0
......@@ -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' })
......
......@@ -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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment