From e61fb5d44c05dfdae61ff71094a38e497bc459c5 Mon Sep 17 00:00:00 2001 From: veselcraft Date: Fri, 11 Feb 2022 17:52:31 +0300 Subject: [PATCH] ActivityPub: Finally, Mastodon, Misskey and Pleroma can see the users --- Web/Models/Repositories/Users.php | 2 -- Web/Presenters/UserPresenter.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Web/Models/Repositories/Users.php b/Web/Models/Repositories/Users.php index 7175d377..9ecc7932 100644 --- a/Web/Models/Repositories/Users.php +++ b/Web/Models/Repositories/Users.php @@ -62,8 +62,6 @@ class Users "all" => sizeof(clone $this->users), "active" => sizeof((clone $this->users)->where("online > 0")), "online" => sizeof((clone $this->users)->where("online >= ?", time() - 900)), - "posts" => (new Posts)->getCountOfAllPosts(), - "comments" => (new Comments)->getCountOfAllComments() ]; } diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index 8b8c31f4..4074ee1f 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -41,7 +41,7 @@ final class UserPresenter extends OpenVKPresenter "name" => $user->getFullName(), "summary" => $user->getDescription(), "url" => $user->getFullURL(), - "prefferedUsername" => $user->getShortCode(), + "preferredUsername" => $user->getShortCode(), "inbox" => $user->getFullURL() . "/inbox", "outbox" => $user->getFullURL() . "/outbox", "followers" => ovk_scheme(true) . $_SERVER['SERVER_NAME'] . "/friends" . $user->getId() . '?act=incoming',