From 24208ef125bd70b4f405e9f221b84ef7f99aadb3 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Jan 2023 21:55:32 +0000 Subject: [PATCH] Fix: Forum posts from some contacts weren't distributed --- src/Module/ActivityPub/Objects.php | 4 +--- src/Module/DFRN/Poll.php | 4 ++-- src/Module/Feed.php | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Module/ActivityPub/Objects.php b/src/Module/ActivityPub/Objects.php index 8c8109d667..528aa94057 100644 --- a/src/Module/ActivityPub/Objects.php +++ b/src/Module/ActivityPub/Objects.php @@ -75,9 +75,7 @@ class Objects extends BaseModule throw new HTTPException\NotFoundException(); } - $owner = User::getById($item['uid'], ['hidewall']); - - $validated = empty($owner['hidewall']) && in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]); + $validated = in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]); if (!$validated) { $requester = HTTPSignature::getSigner('', $_SERVER); diff --git a/src/Module/DFRN/Poll.php b/src/Module/DFRN/Poll.php index 1562ce0de2..e841e9b26b 100644 --- a/src/Module/DFRN/Poll.php +++ b/src/Module/DFRN/Poll.php @@ -37,13 +37,13 @@ class Poll extends BaseModule { $owner = User::getByNickname( $this->parameters['nickname'] ?? '', - ['nickname', 'blocked', 'account_expired', 'account_removed', 'hidewall'] + ['nickname', 'blocked', 'account_expired', 'account_removed'] ); if (!$owner || $owner['account_expired'] || $owner['account_removed']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } - if ($owner['blocked'] || $owner['hidewall']) { + if ($owner['blocked']) { throw new HTTPException\UnauthorizedException($this->t('Access to this profile has been restricted.')); } diff --git a/src/Module/Feed.php b/src/Module/Feed.php index 59714af387..92d65fb4b9 100644 --- a/src/Module/Feed.php +++ b/src/Module/Feed.php @@ -65,7 +65,7 @@ class Feed extends BaseModule throw new HTTPException\NotFoundException($this->t('User not found.')); } - if ($owner['blocked'] || $owner['hidewall']) { + if ($owner['blocked']) { throw new HTTPException\UnauthorizedException($this->t('Access to this profile has been restricted.')); }