diff options
Diffstat (limited to 'server/middlewares/validators/user-subscriptions.ts')
-rw-r--r-- | server/middlewares/validators/user-subscriptions.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/middlewares/validators/user-subscriptions.ts b/server/middlewares/validators/user-subscriptions.ts index c5f8d9d4c..fd82ed017 100644 --- a/server/middlewares/validators/user-subscriptions.ts +++ b/server/middlewares/validators/user-subscriptions.ts | |||
@@ -5,7 +5,6 @@ import { logger } from '../../helpers/logger' | |||
5 | import { areValidationErrors } from './utils' | 5 | import { areValidationErrors } from './utils' |
6 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' | 6 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' |
7 | import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' | 7 | import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' |
8 | import { UserModel } from '../../models/account/user' | ||
9 | import { CONFIG } from '../../initializers' | 8 | import { CONFIG } from '../../initializers' |
10 | import { toArray } from '../../helpers/custom-validators/misc' | 9 | import { toArray } from '../../helpers/custom-validators/misc' |
11 | 10 | ||
@@ -46,7 +45,7 @@ const userSubscriptionGetValidator = [ | |||
46 | let [ name, host ] = req.params.uri.split('@') | 45 | let [ name, host ] = req.params.uri.split('@') |
47 | if (host === CONFIG.WEBSERVER.HOST) host = null | 46 | if (host === CONFIG.WEBSERVER.HOST) host = null |
48 | 47 | ||
49 | const user: UserModel = res.locals.oauth.token.User | 48 | const user = res.locals.oauth.token.User |
50 | const subscription = await ActorFollowModel.loadByActorAndTargetNameAndHostForAPI(user.Account.Actor.id, name, host) | 49 | const subscription = await ActorFollowModel.loadByActorAndTargetNameAndHostForAPI(user.Account.Actor.id, name, host) |
51 | 50 | ||
52 | if (!subscription || !subscription.ActorFollowing.VideoChannel) { | 51 | if (!subscription || !subscription.ActorFollowing.VideoChannel) { |