README.md 1.28 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.

Chocobozzz's avatar
Chocobozzz committed
5
6
7
8
9
## Settings

![settings screen](https://lutim.cpy.re/qaFui9N1.png)

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

Chocobozzz's avatar
Typo    
Chocobozzz committed
11
This plugin expects the following JSON format from public blocklists:
Chocobozzz's avatar
Chocobozzz committed
12
13
14
15
16
17

```
{
  data: {
    value: string
    action?: 'add' | 'remove' // Default is 'add'
18
    updatedAt?: string // ISO 8601
Chocobozzz's avatar
Chocobozzz committed
19
20
21
22
23
24
25
  }[]
}
```

For example:

```
Chocobozzz's avatar
Chocobozzz committed
26
27
28
29
30
31
32
{
  data: [
    {
      value: 'peertube.cpy.re'
    },
    {
      value: 'root@peertube.cpy.re'
33
34
35
36
    },
    {
      value: 'chocobozzz@peertube2.cpy.re',
      updatedAt: '2020-05-07T14:42:48.954Z'
Chocobozzz's avatar
Chocobozzz committed
37
38
39
    }
  ]
}
Chocobozzz's avatar
Chocobozzz committed
40
41
42
43
44
45
46
```

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
47
48
49
50
51
52
53
54
55
56
57
58
{
  data: [
    {
      value: 'peertube.cpy.re',
      action: 'remove'
    },
    {
      value: 'root@peertube.cpy.re'
    }
  ]
}
```
59
60
61
62
63

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