aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r--server/models/video/video-channel.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index ca06048d1..1abc23eaa 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -8,7 +8,8 @@ import {
8 Default, 8 Default,
9 DefaultScope, 9 DefaultScope,
10 ForeignKey, 10 ForeignKey,
11 HasMany, IFindOptions, 11 HasMany,
12 IFindOptions,
12 Is, 13 Is,
13 Model, 14 Model,
14 Scopes, 15 Scopes,
@@ -28,7 +29,7 @@ import { AccountModel, ScopeNames as AccountModelScopeNames } from '../account/a
28import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' 29import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor'
29import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' 30import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils'
30import { VideoModel } from './video' 31import { VideoModel } from './video'
31import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers' 32import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers'
32import { ServerModel } from '../server/server' 33import { ServerModel } from '../server/server'
33import { DefineIndexesOptions } from 'sequelize' 34import { DefineIndexesOptions } from 'sequelize'
34import { AvatarModel } from '../avatar/avatar' 35import { AvatarModel } from '../avatar/avatar'
@@ -419,7 +420,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
419 static loadByNameWithHostAndPopulateAccount (nameWithHost: string) { 420 static loadByNameWithHostAndPopulateAccount (nameWithHost: string) {
420 const [ name, host ] = nameWithHost.split('@') 421 const [ name, host ] = nameWithHost.split('@')
421 422
422 if (!host || host === CONFIG.WEBSERVER.HOST) return VideoChannelModel.loadLocalByNameAndPopulateAccount(name) 423 if (!host || host === WEBSERVER.HOST) return VideoChannelModel.loadLocalByNameAndPopulateAccount(name)
423 424
424 return VideoChannelModel.loadByNameAndHostAndPopulateAccount(name, host) 425 return VideoChannelModel.loadByNameAndHostAndPopulateAccount(name, host)
425 } 426 }