From 50d6de9c286abcb34ff4234d56d9cbb803db7665 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Dec 2017 17:38:41 +0100 Subject: Begin moving video channel to actor --- server/models/video/video-abuse.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'server/models/video/video-abuse.ts') diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts index d0ee969fb..182971c4e 100644 --- a/server/models/video/video-abuse.ts +++ b/server/models/video/video-abuse.ts @@ -3,7 +3,6 @@ import { VideoAbuseObject } from '../../../shared/models/activitypub/objects' import { isVideoAbuseReasonValid } from '../../helpers/custom-validators/videos' import { CONFIG } from '../../initializers' import { AccountModel } from '../account/account' -import { ServerModel } from '../server/server' import { getSort, throwIfNotValid } from '../utils' import { VideoModel } from './video' @@ -63,13 +62,7 @@ export class VideoAbuseModel extends Model { include: [ { model: AccountModel, - required: true, - include: [ - { - model: ServerModel, - required: false - } - ] + required: true }, { model: VideoModel, @@ -87,8 +80,8 @@ export class VideoAbuseModel extends Model { toFormattedJSON () { let reporterServerHost - if (this.Account.Server) { - reporterServerHost = this.Account.Server.host + if (this.Account.Actor.Server) { + reporterServerHost = this.Account.Actor.Server.host } else { // It means it's our video reporterServerHost = CONFIG.WEBSERVER.HOST -- cgit v1.2.3