peertube-theme-nctv-dark/peertube-plugin-auto-mute/README.md

73 lines
1.7 KiB
Markdown
Raw Normal View History

2020-05-07 13:50:46 +00:00
# Auto mute plugin for PeerTube
Auto mute accounts or instances based on public blocklists.
2020-05-11 08:12:57 +00:00
## Mute lists
**Add your public list here**
2020-05-07 14:30:07 +00:00
## Settings
2020-05-11 08:12:57 +00:00
You can choose to expose your mute list that will be available on `https://example.com/plugins/plugins/auto-mute/router/api/v1/mute-list`.
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`
2020-05-07 14:30:07 +00:00
## Blocklist URL format
2020-05-07 13:50:46 +00:00
2020-05-07 14:31:08 +00:00
This plugin expects the following JSON format from public blocklists:
2020-05-07 13:50:46 +00:00
```
{
data: {
value: string
action?: 'add' | 'remove' // Default is 'add'
2020-05-07 15:05:35 +00:00
updatedAt?: string // ISO 8601
2020-05-07 13:50:46 +00:00
}[]
}
```
For example:
```
2020-05-07 13:52:10 +00:00
{
data: [
{
value: 'peertube.cpy.re'
},
{
value: 'root@peertube.cpy.re'
2020-05-07 15:05:35 +00:00
},
{
value: 'chocobozzz@peertube2.cpy.re',
updatedAt: '2020-05-07T14:42:48.954Z'
2020-05-07 13:52:10 +00:00
}
]
}
2020-05-07 13:50:46 +00:00
```
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:
```
2020-05-07 13:52:10 +00:00
{
data: [
{
value: 'peertube.cpy.re',
action: 'remove'
},
{
value: 'root@peertube.cpy.re'
}
]
}
```
2020-05-07 15:05:35 +00:00
The purpose of the `updatedAt` field is to not override admin mutes/unmutes:
2020-05-07 15:10:23 +00:00
* 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