Loading CHANGES.md +12 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,18 @@ To be released. [Astro]: https://astro.build/ Version 0.11.3 -------------- Released on July 15, 2024. - Fixed a bug where use of `Federation.setInboxDispatcher()` after `Federation.setInboxListeners()` had caused a `RouterError` to be thrown even if the paths match. [[#101] by Fabien O'Carroll] [#101]: https://github.com/dahlia/fedify/pull/101 Version 0.11.2 -------------- Loading src/federation/middleware.test.ts +12 −0 Original line number Diff line number Diff line Loading @@ -742,6 +742,18 @@ test("Federation.setInboxDispatcher()", async (t) => { ); }); await t.step("path match", () => { const federation = createFederation<void>({ kv, documentLoader: mockDocumentLoader, }); federation.setInboxListeners("/users/{handle}/inbox"); federation.setInboxDispatcher( "/users/{handle}/inbox", () => ({ items: [] }), ); }); await t.step("wrong variables in path", () => { const federation = createFederation<void>({ kv, Loading src/federation/middleware.ts +1 −0 Original line number Diff line number Diff line Loading @@ -1545,6 +1545,7 @@ export class Federation<TContextData> { "Path for inbox must have one variable: {handle}", ); } this.#inboxPath = inboxPath; } if (sharedInboxPath != null) { const siVars = this.#router.add(sharedInboxPath, "sharedInbox"); Loading Loading
CHANGES.md +12 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,18 @@ To be released. [Astro]: https://astro.build/ Version 0.11.3 -------------- Released on July 15, 2024. - Fixed a bug where use of `Federation.setInboxDispatcher()` after `Federation.setInboxListeners()` had caused a `RouterError` to be thrown even if the paths match. [[#101] by Fabien O'Carroll] [#101]: https://github.com/dahlia/fedify/pull/101 Version 0.11.2 -------------- Loading
src/federation/middleware.test.ts +12 −0 Original line number Diff line number Diff line Loading @@ -742,6 +742,18 @@ test("Federation.setInboxDispatcher()", async (t) => { ); }); await t.step("path match", () => { const federation = createFederation<void>({ kv, documentLoader: mockDocumentLoader, }); federation.setInboxListeners("/users/{handle}/inbox"); federation.setInboxDispatcher( "/users/{handle}/inbox", () => ({ items: [] }), ); }); await t.step("wrong variables in path", () => { const federation = createFederation<void>({ kv, Loading
src/federation/middleware.ts +1 −0 Original line number Diff line number Diff line Loading @@ -1545,6 +1545,7 @@ export class Federation<TContextData> { "Path for inbox must have one variable: {handle}", ); } this.#inboxPath = inboxPath; } if (sharedInboxPath != null) { const siVars = this.#router.add(sharedInboxPath, "sharedInbox"); Loading