diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-02 15:47:05 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-02 16:57:53 +0200 |
commit | 304a84d59c3a800b7f7aef48cf55f307534c0926 (patch) | |
tree | e099aefd76aa8ee5aacef7ddfc59d79111fe474b /server/lib/activitypub/process/process-announce.ts | |
parent | c56faf0d9453490737f283b29a203bb1ca632b95 (diff) | |
download | PeerTube-304a84d59c3a800b7f7aef48cf55f307534c0926.tar.gz PeerTube-304a84d59c3a800b7f7aef48cf55f307534c0926.tar.zst PeerTube-304a84d59c3a800b7f7aef48cf55f307534c0926.zip |
Refactor getOrCreateAPVideo
Diffstat (limited to 'server/lib/activitypub/process/process-announce.ts')
-rw-r--r-- | server/lib/activitypub/process/process-announce.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/process/process-announce.ts b/server/lib/activitypub/process/process-announce.ts index 63082466e..ec23c705e 100644 --- a/server/lib/activitypub/process/process-announce.ts +++ b/server/lib/activitypub/process/process-announce.ts | |||
@@ -3,7 +3,7 @@ import { retryTransactionWrapper } from '../../../helpers/database-utils' | |||
3 | import { sequelizeTypescript } from '../../../initializers/database' | 3 | import { sequelizeTypescript } from '../../../initializers/database' |
4 | import { VideoShareModel } from '../../../models/video/video-share' | 4 | import { VideoShareModel } from '../../../models/video/video-share' |
5 | import { forwardVideoRelatedActivity } from '../send/utils' | 5 | import { forwardVideoRelatedActivity } from '../send/utils' |
6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 6 | import { getOrCreateAPVideo } from '../videos' |
7 | import { Notifier } from '../../notifier' | 7 | 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' |
@@ -32,7 +32,7 @@ async function processVideoShare (actorAnnouncer: MActorSignature, activity: Act | |||
32 | let videoCreated: boolean | 32 | let videoCreated: boolean |
33 | 33 | ||
34 | try { | 34 | try { |
35 | const result = await getOrCreateVideoAndAccountAndChannel({ videoObject: objectUri }) | 35 | const result = await getOrCreateAPVideo({ videoObject: objectUri }) |
36 | video = result.video | 36 | video = result.video |
37 | videoCreated = result.created | 37 | videoCreated = result.created |
38 | } catch (err) { | 38 | } catch (err) { |