diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-04 14:04:02 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-04 14:04:02 +0100 |
commit | a5625b416797fa20f7cccead6201f3faf9427080 (patch) | |
tree | 089ad8155f924385d5f528c96cbcec1b52f56c72 /server/helpers/webfinger.ts | |
parent | 4cb6d4578893db310297d7e118ce2fb7ecb952a3 (diff) | |
download | PeerTube-a5625b416797fa20f7cccead6201f3faf9427080.tar.gz PeerTube-a5625b416797fa20f7cccead6201f3faf9427080.tar.zst PeerTube-a5625b416797fa20f7cccead6201f3faf9427080.zip |
Refresh remote accounts
Diffstat (limited to 'server/helpers/webfinger.ts')
-rw-r--r-- | server/helpers/webfinger.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/webfinger.ts b/server/helpers/webfinger.ts index de8d52c9b..688bf2bab 100644 --- a/server/helpers/webfinger.ts +++ b/server/helpers/webfinger.ts | |||
@@ -15,6 +15,10 @@ async function loadActorUrlOrGetFromWebfinger (name: string, host: string) { | |||
15 | const actor = await ActorModel.loadByNameAndHost(name, host) | 15 | const actor = await ActorModel.loadByNameAndHost(name, host) |
16 | if (actor) return actor.url | 16 | if (actor) return actor.url |
17 | 17 | ||
18 | return getUrlFromWebfinger(name, host) | ||
19 | } | ||
20 | |||
21 | async function getUrlFromWebfinger (name: string, host: string) { | ||
18 | const webfingerData: WebFingerData = await webfingerLookup(name + '@' + host) | 22 | const webfingerData: WebFingerData = await webfingerLookup(name + '@' + host) |
19 | return getLinkOrThrow(webfingerData) | 23 | return getLinkOrThrow(webfingerData) |
20 | } | 24 | } |
@@ -22,6 +26,7 @@ async function loadActorUrlOrGetFromWebfinger (name: string, host: string) { | |||
22 | // --------------------------------------------------------------------------- | 26 | // --------------------------------------------------------------------------- |
23 | 27 | ||
24 | export { | 28 | export { |
29 | getUrlFromWebfinger, | ||
25 | loadActorUrlOrGetFromWebfinger | 30 | loadActorUrlOrGetFromWebfinger |
26 | } | 31 | } |
27 | 32 | ||