accept, $accept))) { return Event::next; } switch ($route) { case 'note_show': $response = NoteResponse::handle($vars['note']); return Event::stop; default: return Event::next; } } /** * This code executes when GNU social creates the page routing, and we hook * on this event to add our action handler for Embed. * * @param $r RouteLoader the router that was initialized. * * @return bool * * public function onAddRoute(RouteLoader $r): bool * { * $r->connect( * 'note_view', * '/note/{id<\d+>}', * [NoteResponse::class, 'handle'], * options: ['accept' => $this->accept] * ); * return Event::next; * }*/ }