Support updatedAt for auto mute plugin

This commit is contained in:
Chocobozzz
2020-05-07 17:05:35 +02:00
parent 6043757011
commit 827d341353
3 changed files with 42 additions and 10 deletions

View File

@ -15,6 +15,7 @@ This plugin expects the following JSON format from public blocklists:
data: {
value: string
action?: 'add' | 'remove' // Default is 'add'
updatedAt?: string // ISO 8601
}[]
}
```
@ -29,6 +30,10 @@ For example:
},
{
value: 'root@peertube.cpy.re'
},
{
value: 'chocobozzz@peertube2.cpy.re',
updatedAt: '2020-05-07T14:42:48.954Z'
}
]
}
@ -51,3 +56,8 @@ For example, to revert `peertube.cpy.re` from the blocklist, update the JSON:
]
}
```
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