X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Fmodels%2Faccount%2Fuser-notification.ts;h=805095002de1b9d07baac518f025990ba934fa4e;hb=ceb8f322118b24508abc6dd0bc6813a43610eff3;hp=25c5232032132ea977217697b4553456b0c49d3a;hpb=903353d67a8d0fdda8465ed6c57b77a9a5afbe92;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/account/user-notification.ts b/server/models/account/user-notification.ts index 25c523203..805095002 100644 --- a/server/models/account/user-notification.ts +++ b/server/models/account/user-notification.ts @@ -10,7 +10,6 @@ import { VideoCommentAbuseModel } from '../abuse/video-comment-abuse' import { ActorModel } from '../activitypub/actor' import { ActorFollowModel } from '../activitypub/actor-follow' import { ApplicationModel } from '../application/application' -import { AvatarModel } from '../avatar/avatar' import { PluginModel } from '../server/plugin' import { ServerModel } from '../server/server' import { getSort, throwIfNotValid } from '../utils' @@ -20,6 +19,7 @@ import { VideoChannelModel } from '../video/video-channel' import { VideoCommentModel } from '../video/video-comment' import { VideoImportModel } from '../video/video-import' import { AccountModel } from './account' +import { ActorImageModel } from './actor-image' import { UserModel } from './user' enum ScopeNames { @@ -34,7 +34,8 @@ function buildActorWithAvatarInclude () { include: [ { attributes: [ 'filename' ], - model: AvatarModel.unscoped(), + as: 'Avatar', + model: ActorImageModel.unscoped(), required: false }, { @@ -172,7 +173,8 @@ function buildAccountInclude (required: boolean, withActor = false) { }, { attributes: [ 'filename' ], - model: AvatarModel.unscoped(), + as: 'Avatar', + model: ActorImageModel.unscoped(), required: false }, {