Unverified Commit 6c2db224 authored by Hong Minhee's avatar Hong Minhee
Browse files

Get rid of false infinite loop warning

parent 59e7d4dc
Loading
Loading
Loading
Loading
+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,
@@ -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);
+5 −3
Original line number Diff line number Diff line
@@ -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,