diff options
-rw-r--r-- | server/lib/activitypub/send/send-reject.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/url.ts | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/server/lib/activitypub/send/send-reject.ts b/server/lib/activitypub/send/send-reject.ts index 83d8dfba7..a5f8c2ecf 100644 --- a/server/lib/activitypub/send/send-reject.ts +++ b/server/lib/activitypub/send/send-reject.ts | |||
@@ -15,7 +15,7 @@ function sendReject (followUrl: string, follower: MActor, following: MActor) { | |||
15 | 15 | ||
16 | const followData = buildFollowActivity(followUrl, follower, following) | 16 | const followData = buildFollowActivity(followUrl, follower, following) |
17 | 17 | ||
18 | const url = getLocalActorFollowRejectActivityPubUrl(follower, following) | 18 | const url = getLocalActorFollowRejectActivityPubUrl() |
19 | const data = buildRejectActivity(url, following, followData) | 19 | const data = buildRejectActivity(url, following, followData) |
20 | 20 | ||
21 | return unicastTo({ data, byActor: following, toActorUrl: follower.inboxUrl, contextType: 'Reject' }) | 21 | return unicastTo({ data, byActor: following, toActorUrl: follower.inboxUrl, contextType: 'Reject' }) |
diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index 2f68f7a17..2c32ba056 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts | |||
@@ -93,14 +93,11 @@ function getLocalActorFollowActivityPubUrl (follower: MActor, following: MActorI | |||
93 | } | 93 | } |
94 | 94 | ||
95 | function getLocalActorFollowAcceptActivityPubUrl (actorFollow: MActorFollowActors) { | 95 | function getLocalActorFollowAcceptActivityPubUrl (actorFollow: MActorFollowActors) { |
96 | const follower = actorFollow.ActorFollower | 96 | return WEBSERVER.URL + '/accepts/follows/' + actorFollow.id |
97 | const me = actorFollow.ActorFollowing | ||
98 | |||
99 | return WEBSERVER.URL + '/accepts/follows/' + follower.id + '/' + me.id | ||
100 | } | 97 | } |
101 | 98 | ||
102 | function getLocalActorFollowRejectActivityPubUrl (follower: MActorId, following: MActorId) { | 99 | function getLocalActorFollowRejectActivityPubUrl () { |
103 | return WEBSERVER.URL + '/rejects/follows/' + follower.id + '/' + following.id | 100 | return WEBSERVER.URL + '/rejects/follows/' + new Date().toISOString() |
104 | } | 101 | } |
105 | 102 | ||
106 | function getLocalVideoAnnounceActivityPubUrl (byActor: MActorId, video: MVideoUrl) { | 103 | function getLocalVideoAnnounceActivityPubUrl (byActor: MActorId, video: MVideoUrl) { |