mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +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
|
||||
ids = (await Promise.all(ids.map(async (id) => {
|
||||
const originalId = id;
|
||||
const isUri = activitypub.helpers.isUri(id);
|
||||
if (id.includes('@') || isUri) {
|
||||
if (id.includes('@')) {
|
||||
const isUri = activitypub.helpers.isUri(id);
|
||||
const host = isUri ? new URL(id).host : id.split('@')[1];
|
||||
if (host === nconf.get('url_parsed').host) { // do not assert loopback ids
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user