forked from GNUsocial/gnu-social
[CONTROLLER][Feeds] Added should_format field on returned array
FeedController will only handle FormatNoteList if the should_format field is true. This change was made to make the replies route feed possible, this route is added by the Conversation component. Since a reply isn't a conversation root, if the FeedController handled the FormatNoteList event, this feed wouldn't have any notes to display.
This commit is contained in:
@@ -48,9 +48,11 @@ abstract class FeedController extends Controller
|
||||
Event::handle('FilterNoteList', [$actor, &$notes]);
|
||||
}
|
||||
|
||||
$notes_out = null;
|
||||
Event::handle('FormatNoteList', [$notes, &$notes_out]);
|
||||
$result['notes'] = $notes_out;
|
||||
if ($result['should_format'] ?? true) {
|
||||
$notes_out = null;
|
||||
Event::handle('FormatNoteList', [$notes, &$notes_out]);
|
||||
$result['notes'] = $notes_out;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
Reference in New Issue
Block a user