Edit severity display for Mastodon CSV

Severity rating was being set as 'defederate' which is not a status in
Masto's blocklist import scheme, so it was changed to 'suspend' for
better compatibility.
This commit is contained in:
Ro 2023-05-08 12:25:38 -07:00
parent 7c5ef7fb0e
commit 56758f094f
No known key found for this signature in database
GPG key ID: 29B551CDBD4D3B50

View file

@ -19,7 +19,11 @@ class HandleExports
$records = [['domain', 'severity', 'public_comment', 'reject_media', 'reject_reports', 'obfuscate']];
$entries = $this->locations->getActiveLocations();
foreach ($entries as $entry) {
$item = [$entry->getUrl(), $entry->getRating(), $entry->getDescription(), "FALSE", "FALSE", "FALSE"];
$rating = $entry->getRating();
if ($rating == "defederate") {
$rating = "suspend";
}
$item = [$entry->getUrl(), $rating, $entry->getDescription(), "FALSE", "FALSE", "FALSE"];
array_push($records, $item);
}