diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-09 08:17:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-09 08:17:16 +0200 |
commit | 5224c394b3bbac6ec1543e41fa0ec6db436e84fa (patch) | |
tree | 36eaecfe095547aca903a8a43fb6e0b0b01899a9 /server/lib/activitypub/process/process-flag.ts | |
parent | 511765c9f86fb07d5d856decd9dbf0ec2092f4fe (diff) | |
download | PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.gz PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.zst PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.zip |
Stronger actor association typing in AP functions
Diffstat (limited to 'server/lib/activitypub/process/process-flag.ts')
-rw-r--r-- | server/lib/activitypub/process/process-flag.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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' | |||
3 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 3 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
4 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
5 | import { sequelizeTypescript } from '../../../initializers' | 5 | import { sequelizeTypescript } from '../../../initializers' |
6 | import { ActorModel } from '../../../models/activitypub/actor' | ||
7 | import { VideoAbuseModel } from '../../../models/video/video-abuse' | 6 | import { VideoAbuseModel } from '../../../models/video/video-abuse' |
8 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
9 | import { Notifier } from '../../notifier' | 8 | import { Notifier } from '../../notifier' |
10 | import { getAPId } from '../../../helpers/activitypub' | 9 | import { getAPId } from '../../../helpers/activitypub' |
11 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 10 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' |
11 | import { SignatureActorModel } from '../../../typings/models' | ||
12 | 12 | ||
13 | async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) { | 13 | async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) { |
14 | const { activity, byActor } = options | 14 | const { activity, byActor } = options |
@@ -23,7 +23,7 @@ export { | |||
23 | 23 | ||
24 | // --------------------------------------------------------------------------- | 24 | // --------------------------------------------------------------------------- |
25 | 25 | ||
26 | async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, byActor: ActorModel) { | 26 | async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, byActor: SignatureActorModel) { |
27 | const flag = activity.type === 'Flag' ? activity : (activity.object as VideoAbuseObject) | 27 | const flag = activity.type === 'Flag' ? activity : (activity.object as VideoAbuseObject) |
28 | 28 | ||
29 | logger.debug('Reporting remote abuse for video %s.', getAPId(flag.object)) | 29 | logger.debug('Reporting remote abuse for video %s.', getAPId(flag.object)) |