aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/process/process-create.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/process/process-create.ts')
-rw-r--r--server/lib/activitypub/process/process-create.ts8
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
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 { resolveThread } from '../video-comments' 6import { resolveThread } from '../video-comments'
8import { getOrCreateVideoAndAccountAndChannel } from '../videos' 7import { getOrCreateVideoAndAccountAndChannel } from '../videos'
9import { forwardVideoRelatedActivity } from '../send/utils' 8import { forwardVideoRelatedActivity } from '../send/utils'
@@ -14,6 +13,7 @@ import { createOrUpdateVideoPlaylist } from '../playlist'
14import { VideoModel } from '../../../models/video/video' 13import { VideoModel } from '../../../models/video/video'
15import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 14import { APProcessorOptions } from '../../../typings/activitypub-processor.model'
16import { VideoCommentModel } from '../../../models/video/video-comment' 15import { VideoCommentModel } from '../../../models/video/video-comment'
16import { SignatureActorModel } from '../../../typings/models'
17 17
18async function processCreateActivity (options: APProcessorOptions<ActivityCreate>) { 18async 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
64async function processCreateCacheFile (activity: ActivityCreate, byActor: ActorModel) { 64async 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
80async function processCreateVideoComment (activity: ActivityCreate, byActor: ActorModel, notify: boolean) { 80async 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
113async function processCreatePlaylist (activity: ActivityCreate, byActor: ActorModel) { 113async 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