From 61b122e88cc6783b4d0cf5142a22002f8e558c60 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 15 Mar 2025 18:35:59 +0000 Subject: implement pages --- routes/lookup.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'routes/lookup.php') diff --git a/routes/lookup.php b/routes/lookup.php index e0a790e..62d9e48 100644 --- a/routes/lookup.php +++ b/routes/lookup.php @@ -34,9 +34,7 @@ Router::getInstance()->mount('/lookup', function (array $args) { throw new NotFound("i can't find any object with that uri, sorry!"); } - if ($object instanceof Note) { - throw new TemporaryRedirect('/@/' . $object->author->getFullHandle() . "/note/$object->id"); - } elseif ($object instanceof Actor) { - throw new TemporaryRedirect('/@/' . $object->getFullHandle()); + if ($object instanceof Note || $object instanceof Actor) { + throw new TemporaryRedirect($object->getLocalUiHref()); } }); \ No newline at end of file -- cgit v1.3