From de94ac86a211dec657332d964693857ec235ce40 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Nov 2020 11:21:08 +0100 Subject: Fix incorrect IDs in AP federation --- server/lib/activitypub/send/send-follow.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'server/lib/activitypub/send/send-follow.ts') 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 @@ +import { Transaction } from 'sequelize' import { ActivityFollow } from '../../../../shared/models/activitypub' -import { getActorFollowActivityPubUrl } from '../url' -import { unicastTo } from './utils' import { logger } from '../../../helpers/logger' -import { Transaction } from 'sequelize' import { MActor, MActorFollowActors } from '../../../types/models' +import { unicastTo } from './utils' function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { const me = actorFollow.ActorFollower @@ -14,8 +13,7 @@ function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { logger.info('Creating job to send follow request to %s.', following.url) - const url = getActorFollowActivityPubUrl(me, following) - const data = buildFollowActivity(url, me, following) + const data = buildFollowActivity(actorFollow.url, me, following) t.afterCommit(() => unicastTo(data, me, following.inboxUrl)) } -- cgit v1.2.3