README.md 1.83 KB
Newer Older
Chocobozzz's avatar
Chocobozzz committed
1
2
3
4
# Auto mute plugin for PeerTube

Auto mute accounts or instances based on public blocklists.

5
6
7
8
## Mute lists

**Add your public list here**

Chocobozzz's avatar
Chocobozzz committed
9
10
 * https://peertube_isolation.frama.io/list/peertube_isolation.json by [@PeerTube_Isolation](https://cornichon.me/@PeerTube_Isolation)

Chocobozzz's avatar
Chocobozzz committed
11
12
## Settings

Chocobozzz's avatar
Chocobozzz committed
13
You can choose to expose your mute list that will be available on `https://example.com/plugins/auto-mute/router/api/v1/mute-list`.
14
15
16
17
18
Other instances can follow your mute list, but muting removal is not supported yet. For example, if you subscribe to the mute list of `example.com`:
 * `example.com` mutes `account1`
 * Your instance automatically mutes `account1`
 * `example.com` unmutes `account1`
 * You instance **will not** unmute `account1`
Chocobozzz's avatar
Chocobozzz committed
19
20

## Blocklist URL format
Chocobozzz's avatar
Chocobozzz committed
21

Chocobozzz's avatar
Typo    
Chocobozzz committed
22
This plugin expects the following JSON format from public blocklists:
Chocobozzz's avatar
Chocobozzz committed
23
24
25
26
27
28

```
{
  data: {
    value: string
    action?: 'add' | 'remove' // Default is 'add'
29
    updatedAt?: string // ISO 8601
Chocobozzz's avatar
Chocobozzz committed
30
31
32
33
34
35
36
  }[]
}
```

For example:

```
Chocobozzz's avatar
Chocobozzz committed
37
38
39
40
41
42
43
{
  data: [
    {
      value: 'peertube.cpy.re'
    },
    {
      value: 'root@peertube.cpy.re'
44
45
46
47
    },
    {
      value: 'chocobozzz@peertube2.cpy.re',
      updatedAt: '2020-05-07T14:42:48.954Z'
Chocobozzz's avatar
Chocobozzz committed
48
49
50
    }
  ]
}
Chocobozzz's avatar
Chocobozzz committed
51
52
53
54
55
56
57
```

This plugin does not apply a diff, so if you want to remove an entity from the blocklist, add `action: 'remove'` to the object.

For example, to revert `peertube.cpy.re` from the blocklist, update the JSON:

```
Chocobozzz's avatar
Chocobozzz committed
58
59
60
61
62
63
64
65
66
67
68
69
{
  data: [
    {
      value: 'peertube.cpy.re',
      action: 'remove'
    },
    {
      value: 'root@peertube.cpy.re'
    }
  ]
}
```
70
71

The purpose of the `updatedAt` field is to not override admin mutes/unmutes:
Chocobozzz's avatar
Typos    
Chocobozzz committed
72
73
74
 * Plugin auto mutes account A with an `updatedAt: '2020-05-07T14:42:48.954Z'`
 * Admin thinks this account is fine so it unmutes account A
 * On another check, the plugin won't re-mute the account A because the `updatedAt` is before the last check