aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-09 08:17:16 +0200
committerChocobozzz <me@florianbigard.com>2019-08-09 08:17:16 +0200
commit5224c394b3bbac6ec1543e41fa0ec6db436e84fa (patch)
tree36eaecfe095547aca903a8a43fb6e0b0b01899a9 /server/lib/activitypub/videos.ts
parent511765c9f86fb07d5d856decd9dbf0ec2092f4fe (diff)
downloadPeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.gz
PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.zst
PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.zip
Stronger actor association typing in AP functions
Diffstat (limited to 'server/lib/activitypub/videos.ts')
-rw-r--r--server/lib/activitypub/videos.ts9
1 files changed, 4 insertions, 5 deletions
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 {
27import { ActorModel } from '../../models/activitypub/actor' 27import { ActorModel } from '../../models/activitypub/actor'
28import { TagModel } from '../../models/video/tag' 28import { TagModel } from '../../models/video/tag'
29import { VideoModel } from '../../models/video/video' 29import { VideoModel } from '../../models/video/video'
30import { VideoChannelModel } from '../../models/video/video-channel'
31import { VideoFileModel } from '../../models/video/video-file' 30import { VideoFileModel } from '../../models/video/video-file'
32import { getOrCreateActorAndServerAndModel } from './actor' 31import { getOrCreateActorAndServerAndModel } from './actor'
33import { addVideoComments } from './video-comments' 32import { addVideoComments } from './video-comments'
@@ -54,9 +53,9 @@ import { ThumbnailModel } from '../../models/video/thumbnail'
54import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' 53import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type'
55import { join } from 'path' 54import { join } from 'path'
56import { FilteredModelAttributes } from '../../typings/sequelize' 55import { FilteredModelAttributes } from '../../typings/sequelize'
57import { Hooks } from '../plugins/hooks'
58import { autoBlacklistVideoIfNeeded } from '../video-blacklist' 56import { autoBlacklistVideoIfNeeded } from '../video-blacklist'
59import { ActorFollowScoreCache } from '../files-cache' 57import { ActorFollowScoreCache } from '../files-cache'
58import { AccountModelIdActor, VideoChannelModelId, VideoChannelModelIdActor } from '../../typings/models'
60 59
61async function federateVideoIfNeeded (video: VideoModel, isNewVideo: boolean, transaction?: sequelize.Transaction) { 60async function federateVideoIfNeeded (video: VideoModel, isNewVideo: boolean, transaction?: sequelize.Transaction) {
62 if ( 61 if (
@@ -239,8 +238,8 @@ async function getOrCreateVideoAndAccountAndChannel (options: {
239async function updateVideoFromAP (options: { 238async function updateVideoFromAP (options: {
240 video: VideoModel, 239 video: VideoModel,
241 videoObject: VideoTorrentObject, 240 videoObject: VideoTorrentObject,
242 account: AccountModel, 241 account: AccountModelIdActor,
243 channel: VideoChannelModel, 242 channel: VideoChannelModelIdActor,
244 overrideTo?: string[] 243 overrideTo?: string[]
245}) { 244}) {
246 const { video, videoObject, account, channel, overrideTo } = options 245 const { video, videoObject, account, channel, overrideTo } = options
@@ -550,7 +549,7 @@ async function createVideo (videoObject: VideoTorrentObject, channelActor: Actor
550} 549}
551 550
552async function videoActivityObjectToDBAttributes ( 551async function videoActivityObjectToDBAttributes (
553 videoChannel: VideoChannelModel, 552 videoChannel: VideoChannelModelId,
554 videoObject: VideoTorrentObject, 553 videoObject: VideoTorrentObject,
555 to: string[] = [] 554 to: string[] = []
556) { 555) {