Skip to content

Packages  ›  trotsky  ›  StepActorUnblock

StepActorUnblock class

Represents step that unblocks the current actor (if blocked).

Signature:

typescript
export declare class StepActorUnblock<P = StepActor, C extends StepActorOutput = StepActorOutput, O = null> extends Step<P, C, O>

Extends: Step<P, C, O>

Example 1

Unblock a specific actor:

ts
await Trotsky.init(agent)
  .actor("user.bsky.social")
  .unblock()
  .run()

Example 2

Unblock all blocked accounts:

ts
const { data: { blocks } } = await agent.app.bsky.graph.getBlocks()

await Trotsky.init(agent)
  .actors(blocks.map(b => b.did))
  .each()
  .unblock()
  .wait(1000)
  .run()

Methods

Method

Modifiers

Description

apply()

Applies the unblock logic: 1. Retrieves the current block list. 2. Checks if the actor is actually blocked. 3. If blocked, deletes the block record to unblock the actor.