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/process/process-flag.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib/activitypub/process/process-flag.ts') diff --git a/server/lib/activitypub/process/process-flag.ts b/server/lib/activitypub/process/process-flag.ts index 532545e58..1f8a80c14 100644 --- a/server/lib/activitypub/process/process-flag.ts +++ b/server/lib/activitypub/process/process-flag.ts @@ -3,12 +3,12 @@ import { VideoAbuseObject } from '../../../../shared/models/activitypub/objects' import { retryTransactionWrapper } from '../../../helpers/database-utils' import { logger } from '../../../helpers/logger' import { sequelizeTypescript } from '../../../initializers' -import { ActorModel } from '../../../models/activitypub/actor' import { VideoAbuseModel } from '../../../models/video/video-abuse' import { getOrCreateVideoAndAccountAndChannel } from '../videos' import { Notifier } from '../../notifier' import { getAPId } from '../../../helpers/activitypub' import { APProcessorOptions } from '../../../typings/activitypub-processor.model' +import { SignatureActorModel } from '../../../typings/models' async function processFlagActivity (options: APProcessorOptions) { const { activity, byActor } = options @@ -23,7 +23,7 @@ export { // --------------------------------------------------------------------------- -async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, byActor: ActorModel) { +async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, byActor: SignatureActorModel) { const flag = activity.type === 'Flag' ? activity : (activity.object as VideoAbuseObject) logger.debug('Reporting remote abuse for video %s.', getAPId(flag.object)) -- cgit v1.2.3