diff options
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r-- | server/models/video/video-channel.ts | 7 |
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 | |||
28 | import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' | 29 | import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' |
29 | import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' | 30 | import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' |
30 | import { VideoModel } from './video' | 31 | import { VideoModel } from './video' |
31 | import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers' | 32 | import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers' |
32 | import { ServerModel } from '../server/server' | 33 | import { ServerModel } from '../server/server' |
33 | import { DefineIndexesOptions } from 'sequelize' | 34 | import { DefineIndexesOptions } from 'sequelize' |
34 | import { AvatarModel } from '../avatar/avatar' | 35 | import { 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 | } |