mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
fix: don't look up webfinger when it's not necessary
This commit is contained in:
@@ -31,8 +31,8 @@ Actors.assert = async (ids, options = {}) => {
|
|||||||
// Translate webfinger handles to uris
|
// Translate webfinger handles to uris
|
||||||
ids = (await Promise.all(ids.map(async (id) => {
|
ids = (await Promise.all(ids.map(async (id) => {
|
||||||
const originalId = id;
|
const originalId = id;
|
||||||
|
if (id.includes('@')) {
|
||||||
const isUri = activitypub.helpers.isUri(id);
|
const isUri = activitypub.helpers.isUri(id);
|
||||||
if (id.includes('@') || isUri) {
|
|
||||||
const host = isUri ? new URL(id).host : id.split('@')[1];
|
const host = isUri ? new URL(id).host : id.split('@')[1];
|
||||||
if (host === nconf.get('url_parsed').host) { // do not assert loopback ids
|
if (host === nconf.get('url_parsed').host) { // do not assert loopback ids
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user