aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/send/send-follow.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/send/send-follow.ts')
-rw-r--r--server/lib/activitypub/send/send-follow.ts8
1 files changed, 3 insertions, 5 deletions
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 @@
1import { Transaction } from 'sequelize'
1import { ActivityFollow } from '../../../../shared/models/activitypub' 2import { ActivityFollow } from '../../../../shared/models/activitypub'
2import { getActorFollowActivityPubUrl } from '../url'
3import { unicastTo } from './utils'
4import { logger } from '../../../helpers/logger' 3import { logger } from '../../../helpers/logger'
5import { Transaction } from 'sequelize'
6import { MActor, MActorFollowActors } from '../../../types/models' 4import { MActor, MActorFollowActors } from '../../../types/models'
5import { unicastTo } from './utils'
7 6
8function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { 7function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
9 const me = actorFollow.ActorFollower 8 const me = actorFollow.ActorFollower
@@ -14,8 +13,7 @@ function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
14 13
15 logger.info('Creating job to send follow request to %s.', following.url) 14 logger.info('Creating job to send follow request to %s.', following.url)
16 15
17 const url = getActorFollowActivityPubUrl(me, following) 16 const data = buildFollowActivity(actorFollow.url, me, following)
18 const data = buildFollowActivity(url, me, following)
19 17
20 t.afterCommit(() => unicastTo(data, me, following.inboxUrl)) 18 t.afterCommit(() => unicastTo(data, me, following.inboxUrl))
21} 19}