From d51f5e5922499c70f60f5680292244944857cd06 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 28 Feb 2024 12:54:54 -0500 Subject: [PATCH] fix: crash in resolveLocalId if Number is passed in --- src/activitypub/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activitypub/helpers.js b/src/activitypub/helpers.js index 04118b8f63..7153deb6c9 100644 --- a/src/activitypub/helpers.js +++ b/src/activitypub/helpers.js @@ -111,7 +111,7 @@ Helpers.resolveLocalId = async (input) => { } return { type: null, id: null }; - } else if (input.indexOf('@') !== -1) { // Webfinger + } else if (String(input).indexOf('@') !== -1) { // Webfinger const [slug] = input.replace(/^acct:/, '').split('@'); const uid = await user.getUidByUserslug(slug); return { type: 'user', id: uid };