From 21afec8586348b11397305455c6b64f303fef592 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 9 Aug 2023 13:58:42 +0200 Subject: [PATCH] fix rewrite rule --- includes/class-activitypub.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/class-activitypub.php b/includes/class-activitypub.php index e379c101..c85bb3d4 100644 --- a/includes/class-activitypub.php +++ b/includes/class-activitypub.php @@ -229,13 +229,14 @@ class Activitypub { 'index.php?rest_route=/' . ACTIVITYPUB_REST_NAMESPACE . '/nodeinfo2', 'top' ); - \add_rewrite_rule( - '^@([\w\-\.]+)', - 'index.php?rest_route=/' . ACTIVITYPUB_REST_NAMESPACE . '/users/$matches[1]', - 'top' - ); } + \add_rewrite_rule( + '^@([\w\-\.]+)', + 'index.php?rest_route=/' . ACTIVITYPUB_REST_NAMESPACE . '/users/$matches[1]', + 'top' + ); + \add_rewrite_endpoint( 'activitypub', EP_AUTHORS | EP_PERMALINK | EP_PAGES ); }