aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/webfinger.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-22 10:43:11 +0200
committerChocobozzz <me@florianbigard.com>2019-08-22 10:43:11 +0200
commit5c5e587307a27e173333789b5b5167d35f468b01 (patch)
tree94e3721caf2e11d38fd5f4112c0fc98da89ac535 /server/helpers/webfinger.ts
parent1b42d73f44811eec1b7ddd72dd0d640a57c3376c (diff)
parentb5fecbf44192144d1ca27c23a0b53922de288c10 (diff)
downloadPeerTube-5c5e587307a27e173333789b5b5167d35f468b01.tar.gz
PeerTube-5c5e587307a27e173333789b5b5167d35f468b01.tar.zst
PeerTube-5c5e587307a27e173333789b5b5167d35f468b01.zip
Merge branch 'feature/strong-model-types' into develop
Diffstat (limited to 'server/helpers/webfinger.ts')
-rw-r--r--server/helpers/webfinger.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/webfinger.ts b/server/helpers/webfinger.ts
index d1229e28f..5443a266b 100644
--- a/server/helpers/webfinger.ts
+++ b/server/helpers/webfinger.ts
@@ -4,6 +4,7 @@ import { ActorModel } from '../models/activitypub/actor'
4import { isTestInstance } from './core-utils' 4import { isTestInstance } from './core-utils'
5import { isActivityPubUrlValid } from './custom-validators/activitypub/misc' 5import { isActivityPubUrlValid } from './custom-validators/activitypub/misc'
6import { WEBSERVER } from '../initializers/constants' 6import { WEBSERVER } from '../initializers/constants'
7import { MActorFull } from '../typings/models'
7 8
8const webfinger = new WebFinger({ 9const webfinger = new WebFinger({
9 webfist_fallback: false, 10 webfist_fallback: false,
@@ -17,7 +18,7 @@ async function loadActorUrlOrGetFromWebfinger (uriArg: string) {
17 const uri = uriArg.startsWith('@') ? uriArg.slice(1) : uriArg 18 const uri = uriArg.startsWith('@') ? uriArg.slice(1) : uriArg
18 19
19 const [ name, host ] = uri.split('@') 20 const [ name, host ] = uri.split('@')
20 let actor: ActorModel 21 let actor: MActorFull
21 22
22 if (!host || host === WEBSERVER.HOST) { 23 if (!host || host === WEBSERVER.HOST) {
23 actor = await ActorModel.loadLocalByName(name) 24 actor = await ActorModel.loadLocalByName(name)