Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
347 changes: 0 additions & 347 deletions packages/core/src/actor.ts

This file was deleted.

48 changes: 48 additions & 0 deletions packages/core/src/bsky/Actor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import type {
AppBskyGraphMuteActor,
AppBskyGraphMuteActorList,
AppBskyGraphUnmuteActor,
AppBskyGraphUnmuteActorList,
AppBskyNS,
} from '@atproto/api';
import { BaseActor } from './BaseActor';

export class Actor extends BaseActor {
/**
* Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.
*/
mute(options?: AppBskyGraphMuteActor.CallOptions) {
return this.instance.graph.muteActor({ actor: this.actor }, options);
}

/**
* Unmutes the specified account. Requires auth.
*/
unmute(options?: AppBskyGraphUnmuteActor.CallOptions) {
return this.instance.graph.unmuteActor({ actor: this.actor }, options);
}

/**
* Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.
*/
static muteMany(
instance: AppBskyNS,
actors: string[],
options?: AppBskyGraphMuteActorList.CallOptions,
) {
// FIXME: Shouldn't this take an array?
return instance.graph.muteActorList({ list: actors[0] }, options);
}

/**
* Unmutes the specified list of accounts. Requires auth.
*/
static unmuteMany(
instance: AppBskyNS,
actors: string[],
options?: AppBskyGraphUnmuteActorList.CallOptions,
) {
// FIXME: Shouldn't this take an array?
return instance.graph.unmuteActorList({ list: actors[0] }, options);
}
}
Loading
Loading