-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmute.ts
More file actions
37 lines (33 loc) · 1.08 KB
/
mute.ts
File metadata and controls
37 lines (33 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import type { Client } from '~/agent/client';
import type { RPCOptions } from '~/types';
export class Mute {
constructor(private client: Client) {}
/**
* Creates a mute relationship for the specified account. Mutes are private in Bluesky.
*/
actor(identifier: string, options: RPCOptions = {}) {
return this.client.call('app.bsky.graph.muteActor', {
data: { actor: identifier },
...options,
});
}
/**
* Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky.
*/
thread(identifier: string, options: RPCOptions = {}) {
return this.client.call('app.bsky.graph.muteThread', {
data: { root: identifier },
...options,
});
}
/**
* Mute an entire list (specified by AT-URI) of actors. This creates a mute relationship for all actors
* on the specified list. Mutes are private on Bluesky.
*/
actorList(identifier: string, options: RPCOptions = {}) {
return this.client.call('app.bsky.graph.muteActorList', {
data: { list: identifier },
...options,
});
}
}