aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/user-subscriptions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/user-subscriptions.ts')
-rw-r--r--server/middlewares/validators/user-subscriptions.ts3
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'
5import { areValidationErrors } from './utils' 5import { areValidationErrors } from './utils'
6import { ActorFollowModel } from '../../models/activitypub/actor-follow' 6import { ActorFollowModel } from '../../models/activitypub/actor-follow'
7import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' 7import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor'
8import { UserModel } from '../../models/account/user'
9import { CONFIG } from '../../initializers' 8import { CONFIG } from '../../initializers'
10import { toArray } from '../../helpers/custom-validators/misc' 9import { 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) {