aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/send/send-accept.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-09 08:17:16 +0200
committerChocobozzz <me@florianbigard.com>2019-08-09 08:17:16 +0200
commit5224c394b3bbac6ec1543e41fa0ec6db436e84fa (patch)
tree36eaecfe095547aca903a8a43fb6e0b0b01899a9 /server/lib/activitypub/send/send-accept.ts
parent511765c9f86fb07d5d856decd9dbf0ec2092f4fe (diff)
downloadPeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.gz
PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.zst
PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.zip
Stronger actor association typing in AP functions
Diffstat (limited to 'server/lib/activitypub/send/send-accept.ts')
-rw-r--r--server/lib/activitypub/send/send-accept.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/send/send-accept.ts b/server/lib/activitypub/send/send-accept.ts
index 388a9ed23..813c42e15 100644
--- a/server/lib/activitypub/send/send-accept.ts
+++ b/server/lib/activitypub/send/send-accept.ts
@@ -1,12 +1,12 @@
1import { ActivityAccept, ActivityFollow } from '../../../../shared/models/activitypub' 1import { ActivityAccept, ActivityFollow } from '../../../../shared/models/activitypub'
2import { ActorModel } from '../../../models/activitypub/actor'
3import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
4import { getActorFollowAcceptActivityPubUrl, getActorFollowActivityPubUrl } from '../url' 2import { getActorFollowAcceptActivityPubUrl, getActorFollowActivityPubUrl } from '../url'
5import { unicastTo } from './utils' 3import { unicastTo } from './utils'
6import { buildFollowActivity } from './send-follow' 4import { buildFollowActivity } from './send-follow'
7import { logger } from '../../../helpers/logger' 5import { logger } from '../../../helpers/logger'
6import { ActorFollowModelLight } from '../../../typings/models/actor-follow'
7import { ActorModelOnly } from '../../../typings/models'
8 8
9async function sendAccept (actorFollow: ActorFollowModel) { 9async function sendAccept (actorFollow: ActorFollowModelLight) {
10 const follower = actorFollow.ActorFollower 10 const follower = actorFollow.ActorFollower
11 const me = actorFollow.ActorFollowing 11 const me = actorFollow.ActorFollowing
12 12
@@ -34,7 +34,7 @@ export {
34 34
35// --------------------------------------------------------------------------- 35// ---------------------------------------------------------------------------
36 36
37function buildAcceptActivity (url: string, byActor: ActorModel, followActivityData: ActivityFollow): ActivityAccept { 37function buildAcceptActivity (url: string, byActor: ActorModelOnly, followActivityData: ActivityFollow): ActivityAccept {
38 return { 38 return {
39 type: 'Accept', 39 type: 'Accept',
40 id: url, 40 id: url,