. // }}} /** * Base class for feed controllers * * @package GNUsocial * @category Controller * * @author Hugo Sales * @copyright 2021 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace App\Core\Controller; use App\Core\Controller; use App\Core\Event; use App\Util\Common; abstract class FeedController extends Controller { public static function post_process(array $result) { $actor = Common::actor(); if (\array_key_exists('notes', $result)) { $notes = $result['notes']; if (!\is_null($actor)) { $notes_out = null; Event::handle('FilterNoteList', [$actor, $notes, &$notes_out]); $notes = $notes_out; } $notes_out = null; Event::handle('FormatNoteList', [$notes, &$notes_out]); $result['notes'] = $notes; } return $result; } }