From 53e8b21ca3b5dc8ccb0f4422d9c0ab1e72d7adfc 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 fd3a2d66c3..9aeef3bb52 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 7b1535c413..dbf91712fc 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 654b8a4e9d..6d291198dc 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.')); }