diff options
Diffstat (limited to 'server/lib/activitypub/process/process-announce.ts')
-rw-r--r-- | server/lib/activitypub/process/process-announce.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/activitypub/process/process-announce.ts b/server/lib/activitypub/process/process-announce.ts index ec23c705e..2619d9754 100644 --- a/server/lib/activitypub/process/process-announce.ts +++ b/server/lib/activitypub/process/process-announce.ts | |||
@@ -8,12 +8,16 @@ import { Notifier } from '../../notifier' | |||
8 | import { logger } from '../../../helpers/logger' | 8 | import { logger } from '../../../helpers/logger' |
9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' | 9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
10 | import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' | 10 | import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' |
11 | import { getAPId } from '@server/helpers/activitypub' | ||
11 | 12 | ||
12 | async function processAnnounceActivity (options: APProcessorOptions<ActivityAnnounce>) { | 13 | async function processAnnounceActivity (options: APProcessorOptions<ActivityAnnounce>) { |
13 | const { activity, byActor: actorAnnouncer } = options | 14 | const { activity, byActor: actorAnnouncer } = options |
14 | // Only notify if it is not from a fetcher job | 15 | // Only notify if it is not from a fetcher job |
15 | const notify = options.fromFetch !== true | 16 | const notify = options.fromFetch !== true |
16 | 17 | ||
18 | // Announces on accounts are not supported | ||
19 | if (actorAnnouncer.type !== 'Application' && actorAnnouncer.type !== 'Group') return | ||
20 | |||
17 | return retryTransactionWrapper(processVideoShare, actorAnnouncer, activity, notify) | 21 | return retryTransactionWrapper(processVideoShare, actorAnnouncer, activity, notify) |
18 | } | 22 | } |
19 | 23 | ||
@@ -26,7 +30,7 @@ export { | |||
26 | // --------------------------------------------------------------------------- | 30 | // --------------------------------------------------------------------------- |
27 | 31 | ||
28 | async function processVideoShare (actorAnnouncer: MActorSignature, activity: ActivityAnnounce, notify: boolean) { | 32 | async function processVideoShare (actorAnnouncer: MActorSignature, activity: ActivityAnnounce, notify: boolean) { |
29 | const objectUri = typeof activity.object === 'string' ? activity.object : activity.object.id | 33 | const objectUri = getAPId(activity.object) |
30 | 34 | ||
31 | let video: MVideoAccountLightBlacklistAllFiles | 35 | let video: MVideoAccountLightBlacklistAllFiles |
32 | let videoCreated: boolean | 36 | let videoCreated: boolean |