Skip to main content

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
a week ago (1.3.0)
method Context.routeActivity
Context.routeActivity(
recipient: string | null,
activity: Activity,
): Promise<boolean>

Manually routes an activity to the appropriate inbox listener.

It is useful for routing an activity that is not received from the network, or for routing an activity that is enclosed in another activity.

Note that the activity will be verified if it has Object Integrity Proofs or is equivalent to the actual remote object. If the activity is not verified, it will be rejected.

Parameters

recipient: string | null

The recipient of the activity. If it is null, the activity will be routed to the shared inbox. Otherwise, the activity will be routed to the personal inbox of the recipient with the given identifier.

activity: Activity

The activity to route. It must have a proof or a dereferenceable id to verify the activity.

optional
options: RouteActivityOptions

Options for routing the activity.

Return Type

true if the activity is successfully verified and routed. Otherwise, false.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { type Context } from "@fedify/fedify";

---- OR ----

Import directly with a jsr specifier

import { type Context } from "jsr:@fedify/fedify";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { type Context } from "@fedify/fedify";

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

import { type Context } from "@fedify/fedify";

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

import { type Context } from "@fedify/fedify";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { type Context } from "@fedify/fedify";