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.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts
index eac60e94f..4e9865af4 100644
--- a/server/lib/activitypub/send/send-follow.ts
+++ b/server/lib/activitypub/send/send-follow.ts
@@ -1,18 +1,17 @@
1import { Transaction } from 'sequelize'
2import { ActivityFollow } from '../../../../shared/models/activitypub' 1import { ActivityFollow } from '../../../../shared/models/activitypub'
3import { ActorModel } from '../../../models/activitypub/actor' 2import { ActorModel } from '../../../models/activitypub/actor'
4import { ActorFollowModel } from '../../../models/activitypub/actor-follow' 3import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
5import { getActorFollowActivityPubUrl } from '../url' 4import { getActorFollowActivityPubUrl } from '../url'
6import { unicastTo } from './misc' 5import { unicastTo } from './misc'
7 6
8function sendFollow (actorFollow: ActorFollowModel, t: Transaction) { 7function sendFollow (actorFollow: ActorFollowModel) {
9 const me = actorFollow.ActorFollower 8 const me = actorFollow.ActorFollower
10 const following = actorFollow.ActorFollowing 9 const following = actorFollow.ActorFollowing
11 10
12 const url = getActorFollowActivityPubUrl(actorFollow) 11 const url = getActorFollowActivityPubUrl(actorFollow)
13 const data = followActivityData(url, me, following) 12 const data = followActivityData(url, me, following)
14 13
15 return unicastTo(data, me, following.inboxUrl, t) 14 return unicastTo(data, me, following.inboxUrl)
16} 15}
17 16
18function followActivityData (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow { 17function followActivityData (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow {