diff options
Diffstat (limited to 'server/models/video/video-abuse.ts')
-rw-r--r-- | server/models/video/video-abuse.ts | 13 |
1 files changed, 3 insertions, 10 deletions
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' | |||
3 | import { isVideoAbuseReasonValid } from '../../helpers/custom-validators/videos' | 3 | import { isVideoAbuseReasonValid } from '../../helpers/custom-validators/videos' |
4 | import { CONFIG } from '../../initializers' | 4 | import { CONFIG } from '../../initializers' |
5 | import { AccountModel } from '../account/account' | 5 | import { AccountModel } from '../account/account' |
6 | import { ServerModel } from '../server/server' | ||
7 | import { getSort, throwIfNotValid } from '../utils' | 6 | import { getSort, throwIfNotValid } from '../utils' |
8 | import { VideoModel } from './video' | 7 | import { VideoModel } from './video' |
9 | 8 | ||
@@ -63,13 +62,7 @@ export class VideoAbuseModel extends Model<VideoAbuseModel> { | |||
63 | include: [ | 62 | include: [ |
64 | { | 63 | { |
65 | model: AccountModel, | 64 | model: AccountModel, |
66 | required: true, | 65 | required: true |
67 | include: [ | ||
68 | { | ||
69 | model: ServerModel, | ||
70 | required: false | ||
71 | } | ||
72 | ] | ||
73 | }, | 66 | }, |
74 | { | 67 | { |
75 | model: VideoModel, | 68 | model: VideoModel, |
@@ -87,8 +80,8 @@ export class VideoAbuseModel extends Model<VideoAbuseModel> { | |||
87 | toFormattedJSON () { | 80 | toFormattedJSON () { |
88 | let reporterServerHost | 81 | let reporterServerHost |
89 | 82 | ||
90 | if (this.Account.Server) { | 83 | if (this.Account.Actor.Server) { |
91 | reporterServerHost = this.Account.Server.host | 84 | reporterServerHost = this.Account.Actor.Server.host |
92 | } else { | 85 | } else { |
93 | // It means it's our video | 86 | // It means it's our video |
94 | reporterServerHost = CONFIG.WEBSERVER.HOST | 87 | reporterServerHost = CONFIG.WEBSERVER.HOST |