From 5224c394b3bbac6ec1543e41fa0ec6db436e84fa Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 9 Aug 2019 08:17:16 +0200 Subject: Stronger actor association typing in AP functions --- server/lib/activitypub/send/send-follow.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 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 c6e7fe83d..a59ed50cf 100644 --- a/server/lib/activitypub/send/send-follow.ts +++ b/server/lib/activitypub/send/send-follow.ts @@ -1,10 +1,10 @@ import { ActivityFollow } from '../../../../shared/models/activitypub' -import { ActorModel } from '../../../models/activitypub/actor' import { ActorFollowModel } from '../../../models/activitypub/actor-follow' import { getActorFollowActivityPubUrl } from '../url' import { unicastTo } from './utils' import { logger } from '../../../helpers/logger' import { Transaction } from 'sequelize' +import { ActorModelOnly } from '../../../typings/models' function sendFollow (actorFollow: ActorFollowModel, t: Transaction) { const me = actorFollow.ActorFollower @@ -21,7 +21,7 @@ function sendFollow (actorFollow: ActorFollowModel, t: Transaction) { t.afterCommit(() => unicastTo(data, me, following.inboxUrl)) } -function buildFollowActivity (url: string, byActor: ActorModel, targetActor: ActorModel): ActivityFollow { +function buildFollowActivity (url: string, byActor: ActorModelOnly, targetActor: ActorModelOnly): ActivityFollow { return { type: 'Follow', id: url, -- cgit v1.2.3