X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fvideos.ts;h=3a8451a326116c91c78bfcf04a40dc4d2efdebc9;hb=5224c394b3bbac6ec1543e41fa0ec6db436e84fa;hp=2102702e19eac5d0589226b4be014bcb1eebb5a9;hpb=6b9c966f6428c9e47bead3410a0401e8ebd744bf;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 2102702e1..3a8451a32 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -27,7 +27,6 @@ import { import { ActorModel } from '../../models/activitypub/actor' import { TagModel } from '../../models/video/tag' import { VideoModel } from '../../models/video/video' -import { VideoChannelModel } from '../../models/video/video-channel' import { VideoFileModel } from '../../models/video/video-file' import { getOrCreateActorAndServerAndModel } from './actor' import { addVideoComments } from './video-comments' @@ -54,9 +53,9 @@ import { ThumbnailModel } from '../../models/video/thumbnail' import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' import { join } from 'path' import { FilteredModelAttributes } from '../../typings/sequelize' -import { Hooks } from '../plugins/hooks' import { autoBlacklistVideoIfNeeded } from '../video-blacklist' import { ActorFollowScoreCache } from '../files-cache' +import { AccountModelIdActor, VideoChannelModelId, VideoChannelModelIdActor } from '../../typings/models' async function federateVideoIfNeeded (video: VideoModel, isNewVideo: boolean, transaction?: sequelize.Transaction) { if ( @@ -239,8 +238,8 @@ async function getOrCreateVideoAndAccountAndChannel (options: { async function updateVideoFromAP (options: { video: VideoModel, videoObject: VideoTorrentObject, - account: AccountModel, - channel: VideoChannelModel, + account: AccountModelIdActor, + channel: VideoChannelModelIdActor, overrideTo?: string[] }) { const { video, videoObject, account, channel, overrideTo } = options @@ -550,7 +549,7 @@ async function createVideo (videoObject: VideoTorrentObject, channelActor: Actor } async function videoActivityObjectToDBAttributes ( - videoChannel: VideoChannelModel, + videoChannel: VideoChannelModelId, videoObject: VideoTorrentObject, to: string[] = [] ) {