[EVENTS] Change FormatNoteList do separate in and out arguments

This is necessary due to some weird problem which I wasn't able to figure out (but which doesn't matter)
that somehow causes the event to be called twice during testing, and thus the function was exploding
This commit is contained in:
2021-08-07 21:52:00 +00:00
parent 57f43108bb
commit 061a85d6b3
4 changed files with 58 additions and 15 deletions

View File

@@ -35,11 +35,11 @@ class Favourite
'where f.gsactor_id = :id ' .
'order by f.created DESC', ['id' => $actor_id]);
Event::handle('FormatNoteList', [&$notes]);
Event::handle('FormatNoteList', [$notes, &$note_out]);
return [
'_template' => 'network/public.html.twig',
'notes' => $notes,
'notes' => $notes_out,
];
}
@@ -62,7 +62,7 @@ class Favourite
'order by f.created DESC' ,
['id' => $actor_id]);
Event::handle('FormatNoteList', [&$notes]);
Event::handle('FormatNoteList', [$notes, &$notes_out]);
return [
'_template' => 'network/reversefavs.html.twig',