aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/process/process-flag.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/process/process-flag.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/process/process-flag.ts')
-rw-r--r--server/lib/activitypub/process/process-flag.ts4
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'
3import { retryTransactionWrapper } from '../../../helpers/database-utils' 3import { retryTransactionWrapper } from '../../../helpers/database-utils'
4import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
5import { sequelizeTypescript } from '../../../initializers' 5import { sequelizeTypescript } from '../../../initializers'
6import { ActorModel } from '../../../models/activitypub/actor'
7import { VideoAbuseModel } from '../../../models/video/video-abuse' 6import { VideoAbuseModel } from '../../../models/video/video-abuse'
8import { getOrCreateVideoAndAccountAndChannel } from '../videos' 7import { getOrCreateVideoAndAccountAndChannel } from '../videos'
9import { Notifier } from '../../notifier' 8import { Notifier } from '../../notifier'
10import { getAPId } from '../../../helpers/activitypub' 9import { getAPId } from '../../../helpers/activitypub'
11import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 10import { APProcessorOptions } from '../../../typings/activitypub-processor.model'
11import { SignatureActorModel } from '../../../typings/models'
12 12
13async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) { 13async 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
26async function processCreateVideoAbuse (activity: ActivityCreate | ActivityFlag, byActor: ActorModel) { 26async 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))