Skip to main content

Overview

Returns a function that blocks a user by their ID. On a new block, the server retroactively removes any existing follows and connections between the two users (both directions). Blocking is idempotent — re-blocking an already-blocked user succeeds.
Requires the moderation bundle. See Moderation — Blocking.

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
The ID of the user to block (the target).

Returns

The returned function resolves to void on success.