aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 9d89efa5b..086269921 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -100,10 +100,10 @@ import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../types/models
100import { VideoAbuseModel } from '../abuse/video-abuse' 100import { VideoAbuseModel } from '../abuse/video-abuse'
101import { AccountModel } from '../account/account' 101import { AccountModel } from '../account/account'
102import { AccountVideoRateModel } from '../account/account-video-rate' 102import { AccountVideoRateModel } from '../account/account-video-rate'
103import { ActorImageModel } from '../account/actor-image'
103import { UserModel } from '../account/user' 104import { UserModel } from '../account/user'
104import { UserVideoHistoryModel } from '../account/user-video-history' 105import { UserVideoHistoryModel } from '../account/user-video-history'
105import { ActorModel } from '../activitypub/actor' 106import { ActorModel } from '../activitypub/actor'
106import { AvatarModel } from '../avatar/avatar'
107import { VideoRedundancyModel } from '../redundancy/video-redundancy' 107import { VideoRedundancyModel } from '../redundancy/video-redundancy'
108import { ServerModel } from '../server/server' 108import { ServerModel } from '../server/server'
109import { TrackerModel } from '../server/tracker' 109import { TrackerModel } from '../server/tracker'
@@ -286,7 +286,8 @@ export type AvailableForListIDsOptions = {
286 required: false 286 required: false
287 }, 287 },
288 { 288 {
289 model: AvatarModel.unscoped(), 289 model: ActorImageModel.unscoped(),
290 as: 'Avatar',
290 required: false 291 required: false
291 } 292 }
292 ] 293 ]
@@ -308,7 +309,8 @@ export type AvailableForListIDsOptions = {
308 required: false 309 required: false
309 }, 310 },
310 { 311 {
311 model: AvatarModel.unscoped(), 312 model: ActorImageModel.unscoped(),
313 as: 'Avatar',
312 required: false 314 required: false
313 } 315 }
314 ] 316 ]
@@ -1703,7 +1705,7 @@ export class VideoModel extends Model {
1703 1705
1704 function buildActor (rowActor: any) { 1706 function buildActor (rowActor: any) {
1705 const avatarModel = rowActor.Avatar.id !== null 1707 const avatarModel = rowActor.Avatar.id !== null
1706 ? new AvatarModel(pick(rowActor.Avatar, avatarKeys), buildOpts) 1708 ? new ActorImageModel(pick(rowActor.Avatar, avatarKeys), buildOpts)
1707 : null 1709 : null
1708 1710
1709 const serverModel = rowActor.Server.id !== null 1711 const serverModel = rowActor.Server.id !== null