Skip to content

Commit

Permalink
fix: don't look up webfinger when it's not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
oplik0 committed Apr 25, 2024
1 parent ee67794 commit dd71340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/activitypub/actors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dd71340

Please sign in to comment.