pluginified most of hasFave, getFaves and related calls
The code is now more event-driven when it comes to rendering notices and their related HTML elements, since we can't have direct calls from core to a plugin. lib/activitymover.php has a function to move a Favorite activity which will not happen now. The move must be pluginified and performed as an event which plugins can catch on to.
This commit is contained in:
@@ -249,12 +249,9 @@ class ActivitySpamPlugin extends Plugin
|
||||
/**
|
||||
* Pre-cache our spam scores if needed.
|
||||
*/
|
||||
function onEndNoticeListPrefill(&$notices, &$profiles, $avatarSize) {
|
||||
function onEndNoticeListPrefill(array &$notices, array &$profiles, array $notice_ids, Profile $scoped=null) {
|
||||
if ($this->hideSpam) {
|
||||
foreach ($notices as $notice) {
|
||||
$ids[] = $notice->id;
|
||||
}
|
||||
Spam_score::multiGet('notice_id', $ids);
|
||||
Spam_score::multiGet('notice_id', $notice_ids);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user