New addon providing additional statistics for moderation #1518
No reviewers
Labels
No labels
2018.09
2019.01
2019.03
2019.06
2019.09
2019.12
2020.03
2020.06
2020.09
2020.12
2021.03
2021.07
2021.09
2022.02
2022.06
2022.09
2022.12
2023.04
2023.05
2023.09
2024.03
2024.06
2024.09
2024.12
dependencies
Hackathon 2021
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: friendica/friendica-addons#1518
Loading…
Reference in a new issue
No description provided.
Delete branch "mexon/friendica-addons:mat/ratioed-plugin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This partly came out of a suggestion about a moderation tool, that partly overlapped with a tool I was after. This certainly doesn't address the original idea. In particular, it doesn't proactively provide warnings or notices, and it's not even possible to sort by the statistics. It does, however, expose some more information that may be useful. It provides something like the classic "ratio": number of comments divided by the number of likes/boosts, all over the last 24 hours. Over "2" is considered concerning, and those users are highlighted. It also exposes the number of block notifications received for that user. Blocks aren't dated, so that's a lifetime tally.
The first attached screenshot shows the new tab, called "Behaviour". Of the users, Pizzazz is highlighted, indicating that there's a problem. In the second screenshot, you can see that she received 11 comments in the last 24 hours and 4 reactions, for a ratio of 2.8. In the third screenshot, for comparison, Stormer has 5 comments and 4 reactions, for a ratio of 1.3.
This plugin as it stands is at best only barely over the threshold of being useful. It would never work on a site with thousands of active users. That would require a more complicated implementation. Perhaps it could be implemented as a hook when each post is received that updates statistics, or perhaps a cron job running once per hour could do it all in a batch. Either way, you'd need a way to retrieve users sorted by these additional metrics, which is a hard problem.
However, this might provide some inspiration for other people to implement something more interesting, and perhaps a sandbox to add more creative metrics.
This depends on this change in core to add the necessary hook.
Thank you for your work!
@ -0,0 +28,4 @@
/**
* @brief Uninstallation hook for ratioed plugin
*/
function ratioed_uninstall() {
If your
uninstall
method only removes hooks, it's redundant with the default uninstall behavior which is to remove all hooks.@ -0,0 +59,4 @@
]);
}
class Ratioed extends Friendica\Module\Moderation\Users\Active
Please move this class to its own separate file.
I realize I clicked on the merge button a little too early, and my review came after, sorry about the timing mistake.
No worries, I'll implement your suggested changes in another PR. Meanwhile, this plugin won't work well without the corresponding change in core, so have a look at that.
New PR here: #1519. I also think this addon should have some help text, so I'll do that in another PR later.