Loading packages/fedify/src/federation/middleware.ts +16 −15 Original line number Diff line number Diff line Loading @@ -1947,15 +1947,16 @@ export class ContextImpl<TContextData> implements Context<TContextData> { if (this.federation.actorCallbacks?.keyPairsDispatcher == null) { throw new Error("No actor key pairs dispatcher registered."); } const path = this.federation.router.build( "actor", { identifier, handle: identifier }, ); if (path == null) { logger.warn("No actor dispatcher registered."); let actorUri: URL; try { actorUri = this.getActorUri(identifier); } catch (error) { if (error instanceof RouterError) { logger.warn(error.message); return []; } const actorUri = new URL(path, this.canonicalOrigin); throw error; } const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher( new ContextImpl({ ...this, Loading Loading @@ -2263,13 +2264,13 @@ export class ContextImpl<TContextData> implements Context<TContextData> { expandedRecipients.push(recipient); } if (options.syncCollection) { const collectionId = this.federation.router.build( "followers", { identifier, handle: identifier }, ); opts.collectionSync = collectionId == null ? undefined : new URL(collectionId, this.canonicalOrigin).href; try { opts.collectionSync = this.getFollowersUri(identifier).href; } catch (error) { if (error instanceof RouterError) { opts.collectionSync = undefined; } else throw error; } } } else { expandedRecipients = [recipients]; Loading Loading
packages/fedify/src/federation/middleware.ts +16 −15 Original line number Diff line number Diff line Loading @@ -1947,15 +1947,16 @@ export class ContextImpl<TContextData> implements Context<TContextData> { if (this.federation.actorCallbacks?.keyPairsDispatcher == null) { throw new Error("No actor key pairs dispatcher registered."); } const path = this.federation.router.build( "actor", { identifier, handle: identifier }, ); if (path == null) { logger.warn("No actor dispatcher registered."); let actorUri: URL; try { actorUri = this.getActorUri(identifier); } catch (error) { if (error instanceof RouterError) { logger.warn(error.message); return []; } const actorUri = new URL(path, this.canonicalOrigin); throw error; } const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher( new ContextImpl({ ...this, Loading Loading @@ -2263,13 +2264,13 @@ export class ContextImpl<TContextData> implements Context<TContextData> { expandedRecipients.push(recipient); } if (options.syncCollection) { const collectionId = this.federation.router.build( "followers", { identifier, handle: identifier }, ); opts.collectionSync = collectionId == null ? undefined : new URL(collectionId, this.canonicalOrigin).href; try { opts.collectionSync = this.getFollowersUri(identifier).href; } catch (error) { if (error instanceof RouterError) { opts.collectionSync = undefined; } else throw error; } } } else { expandedRecipients = [recipients]; Loading