diff options
Diffstat (limited to 'server/lib/activitypub/process/process-create.ts')
-rw-r--r-- | server/lib/activitypub/process/process-create.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index b81021163..6815c6997 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts | |||
@@ -3,7 +3,6 @@ import { VideoCommentObject } from '../../../../shared/models/activitypub/object | |||
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 { resolveThread } from '../video-comments' | 6 | import { resolveThread } from '../video-comments' |
8 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
9 | import { forwardVideoRelatedActivity } from '../send/utils' | 8 | import { forwardVideoRelatedActivity } from '../send/utils' |
@@ -14,6 +13,7 @@ import { createOrUpdateVideoPlaylist } from '../playlist' | |||
14 | import { VideoModel } from '../../../models/video/video' | 13 | import { VideoModel } from '../../../models/video/video' |
15 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 14 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' |
16 | import { VideoCommentModel } from '../../../models/video/video-comment' | 15 | import { VideoCommentModel } from '../../../models/video/video-comment' |
16 | import { SignatureActorModel } from '../../../typings/models' | ||
17 | 17 | ||
18 | async function processCreateActivity (options: APProcessorOptions<ActivityCreate>) { | 18 | async function processCreateActivity (options: APProcessorOptions<ActivityCreate>) { |
19 | const { activity, byActor } = options | 19 | const { activity, byActor } = options |
@@ -61,7 +61,7 @@ async function processCreateVideo (activity: ActivityCreate, notify: boolean) { | |||
61 | return video | 61 | return video |
62 | } | 62 | } |
63 | 63 | ||
64 | async function processCreateCacheFile (activity: ActivityCreate, byActor: ActorModel) { | 64 | async function processCreateCacheFile (activity: ActivityCreate, byActor: SignatureActorModel) { |
65 | const cacheFile = activity.object as CacheFileObject | 65 | const cacheFile = activity.object as CacheFileObject |
66 | 66 | ||
67 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: cacheFile.object }) | 67 | const { video } = await getOrCreateVideoAndAccountAndChannel({ videoObject: cacheFile.object }) |
@@ -77,7 +77,7 @@ async function processCreateCacheFile (activity: ActivityCreate, byActor: ActorM | |||
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | async function processCreateVideoComment (activity: ActivityCreate, byActor: ActorModel, notify: boolean) { | 80 | async function processCreateVideoComment (activity: ActivityCreate, byActor: SignatureActorModel, notify: boolean) { |
81 | const commentObject = activity.object as VideoCommentObject | 81 | const commentObject = activity.object as VideoCommentObject |
82 | const byAccount = byActor.Account | 82 | const byAccount = byActor.Account |
83 | 83 | ||
@@ -110,7 +110,7 @@ async function processCreateVideoComment (activity: ActivityCreate, byActor: Act | |||
110 | if (created && notify) Notifier.Instance.notifyOnNewComment(comment) | 110 | if (created && notify) Notifier.Instance.notifyOnNewComment(comment) |
111 | } | 111 | } |
112 | 112 | ||
113 | async function processCreatePlaylist (activity: ActivityCreate, byActor: ActorModel) { | 113 | async function processCreatePlaylist (activity: ActivityCreate, byActor: SignatureActorModel) { |
114 | const playlistObject = activity.object as PlaylistObject | 114 | const playlistObject = activity.object as PlaylistObject |
115 | const byAccount = byActor.Account | 115 | const byAccount = byActor.Account |
116 | 116 | ||