diff options
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 10 |
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 | |||
100 | import { VideoAbuseModel } from '../abuse/video-abuse' | 100 | import { VideoAbuseModel } from '../abuse/video-abuse' |
101 | import { AccountModel } from '../account/account' | 101 | import { AccountModel } from '../account/account' |
102 | import { AccountVideoRateModel } from '../account/account-video-rate' | 102 | import { AccountVideoRateModel } from '../account/account-video-rate' |
103 | import { ActorImageModel } from '../account/actor-image' | ||
103 | import { UserModel } from '../account/user' | 104 | import { UserModel } from '../account/user' |
104 | import { UserVideoHistoryModel } from '../account/user-video-history' | 105 | import { UserVideoHistoryModel } from '../account/user-video-history' |
105 | import { ActorModel } from '../activitypub/actor' | 106 | import { ActorModel } from '../activitypub/actor' |
106 | import { AvatarModel } from '../avatar/avatar' | ||
107 | import { VideoRedundancyModel } from '../redundancy/video-redundancy' | 107 | import { VideoRedundancyModel } from '../redundancy/video-redundancy' |
108 | import { ServerModel } from '../server/server' | 108 | import { ServerModel } from '../server/server' |
109 | import { TrackerModel } from '../server/tracker' | 109 | import { 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 |