Loading federation/handler.ts +4 −1 Original line number Diff line number Diff line import { getLogger } from "@logtape/logtape"; import { accepts } from "@std/http/negotiation"; import type { DocumentLoader } from "../runtime/docloader.ts"; import { verifyRequest } from "../sig/http.ts"; import { doesActorOwnKey } from "../sig/owner.ts"; import { verifyObject } from "../sig/proof.ts"; import type { DocumentLoader } from "../runtime/docloader.ts"; import type { Recipient } from "../vocab/actor.ts"; import { Activity, Loading Loading @@ -61,6 +61,9 @@ export async function handleActor<TContextData>( }: ActorHandlerParameters<TContextData>, ): Promise<Response> { if (actorDispatcher == null) return await onNotFound(request); // FIXME: When the deprecated last parameter (key) of ActorDispatcher // is removed, replace the below line with a direct all to // actorDispatcher: const actor = await context.getActor(handle); if (actor == null) return await onNotFound(request); if (!acceptsJsonLd(request)) return await onNotAcceptable(request); Loading federation/middleware.ts +5 −3 Original line number Diff line number Diff line Loading @@ -1243,9 +1243,11 @@ export class Federation<TContextData> { nodeInfoDispatcher: this.#nodeInfoDispatcher!, }); case "actor": context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { handle: route.values.handle }, }); // FIXME: When the deprecated last parameter (key) of ActorDispatcher // is removed, uncomment the following line. // context = this.#createContext(request, contextData, { // invokedFromActorDispatcher: { handle: route.values.handle }, // }); return await handleActor(request, { handle: route.values.handle, context, Loading Loading
federation/handler.ts +4 −1 Original line number Diff line number Diff line import { getLogger } from "@logtape/logtape"; import { accepts } from "@std/http/negotiation"; import type { DocumentLoader } from "../runtime/docloader.ts"; import { verifyRequest } from "../sig/http.ts"; import { doesActorOwnKey } from "../sig/owner.ts"; import { verifyObject } from "../sig/proof.ts"; import type { DocumentLoader } from "../runtime/docloader.ts"; import type { Recipient } from "../vocab/actor.ts"; import { Activity, Loading Loading @@ -61,6 +61,9 @@ export async function handleActor<TContextData>( }: ActorHandlerParameters<TContextData>, ): Promise<Response> { if (actorDispatcher == null) return await onNotFound(request); // FIXME: When the deprecated last parameter (key) of ActorDispatcher // is removed, replace the below line with a direct all to // actorDispatcher: const actor = await context.getActor(handle); if (actor == null) return await onNotFound(request); if (!acceptsJsonLd(request)) return await onNotAcceptable(request); Loading
federation/middleware.ts +5 −3 Original line number Diff line number Diff line Loading @@ -1243,9 +1243,11 @@ export class Federation<TContextData> { nodeInfoDispatcher: this.#nodeInfoDispatcher!, }); case "actor": context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { handle: route.values.handle }, }); // FIXME: When the deprecated last parameter (key) of ActorDispatcher // is removed, uncomment the following line. // context = this.#createContext(request, contextData, { // invokedFromActorDispatcher: { handle: route.values.handle }, // }); return await handleActor(request, { handle: route.values.handle, context, Loading