diff --git a/lib/inbox-listeners.js b/lib/inbox-listeners.js index e7df6b6..cfe95b6 100644 --- a/lib/inbox-listeners.js +++ b/lib/inbox-listeners.js @@ -207,10 +207,14 @@ export function registerInboxListeners(inboxChain, options) { actorObj?.preferredUsername?.toString() || actorUrl; - const inReplyTo = - object instanceof Note - ? (await object.getInReplyTo())?.id?.href - : null; + let inReplyTo = null; + if (object instanceof Note && typeof object.getInReplyTo === "function") { + try { + inReplyTo = (await object.getInReplyTo())?.id?.href ?? null; + } catch { + /* remote fetch may fail */ + } + } // Log replies to our posts (existing behavior for conversations) if (inReplyTo) { diff --git a/package.json b/package.json index 8506ece..174870c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rmdes/indiekit-endpoint-activitypub", - "version": "1.0.11", + "version": "1.0.12", "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.", "keywords": [ "indiekit",