diff options
Diffstat (limited to 'server/lib/activitypub/send/send-follow.ts')
-rw-r--r-- | server/lib/activitypub/send/send-follow.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts index 51735ddfd..eac60e94f 100644 --- a/server/lib/activitypub/send/send-follow.ts +++ b/server/lib/activitypub/send/send-follow.ts | |||
@@ -1,26 +1,26 @@ | |||
1 | import { Transaction } from 'sequelize' | 1 | import { Transaction } from 'sequelize' |
2 | import { ActivityFollow } from '../../../../shared/models/activitypub' | 2 | import { ActivityFollow } from '../../../../shared/models/activitypub' |
3 | import { AccountModel } from '../../../models/account/account' | 3 | import { ActorModel } from '../../../models/activitypub/actor' |
4 | import { AccountFollowModel } from '../../../models/account/account-follow' | 4 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
5 | import { getAccountFollowActivityPubUrl } from '../url' | 5 | import { getActorFollowActivityPubUrl } from '../url' |
6 | import { unicastTo } from './misc' | 6 | import { unicastTo } from './misc' |
7 | 7 | ||
8 | function sendFollow (accountFollow: AccountFollowModel, t: Transaction) { | 8 | function sendFollow (actorFollow: ActorFollowModel, t: Transaction) { |
9 | const me = accountFollow.AccountFollower | 9 | const me = actorFollow.ActorFollower |
10 | const following = accountFollow.AccountFollowing | 10 | const following = actorFollow.ActorFollowing |
11 | 11 | ||
12 | const url = getAccountFollowActivityPubUrl(accountFollow) | 12 | const url = getActorFollowActivityPubUrl(actorFollow) |
13 | const data = followActivityData(url, me, following) | 13 | const data = followActivityData(url, me, following) |
14 | 14 | ||
15 | return unicastTo(data, me, following.inboxUrl, t) | 15 | return unicastTo(data, me, following.inboxUrl, t) |
16 | } | 16 | } |
17 | 17 | ||
18 | function followActivityData (url: string, byAccount: AccountModel, targetAccount: AccountModel): ActivityFollow { | 18 | function followActivityData (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow { |
19 | return { | 19 | return { |
20 | type: 'Follow', | 20 | type: 'Follow', |
21 | id: url, | 21 | id: url, |
22 | actor: byAccount.url, | 22 | actor: byActor.url, |
23 | object: targetAccount.url | 23 | object: targetActor.url |
24 | } | 24 | } |
25 | } | 25 | } |
26 | 26 | ||