Skip to main content
This release is a pre-release — the latest non-prerelease version of @fedify/fedify is 1.2.3. Jump to this version

@fedify/fedify@1.3.0-dev.477+5c1eaa6b
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-dev.477+5c1eaa6b)
method InboxListenerSetters.on
InboxListenerSetters.on<TActivity extends Activity>(
type: new (...args: any[]) => TActivity,
listener: InboxListener<TContextData, TActivity>,
): InboxListenerSetters<TContextData>

Registers a listener for a specific incoming activity type.

Type Parameters

TActivity extends Activity

Parameters

type: new (...args: any[]) => TActivity

A subclass of Activity to listen to.

listener: InboxListener<TContextData, TActivity>

A callback to handle an incoming activity.

Return Type

InboxListenerSetters<TContextData>

The setters object so that settings can be chained.

Add Package

deno add jsr:@fedify/fedify

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @fedify/fedify

Import symbol

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

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

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

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

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

Add Package

bunx jsr add @fedify/fedify

Import symbol

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