mirror of
https://github.com/friendica/friendica
synced 2024-12-23 12:40:17 +00:00
Merge pull request #10929 from MrPetovan/bug/notices
Test item psid against PermissionSet::PUBLIC constant instead in ActivityPub\Objects
This commit is contained in:
commit
3921bd06cb
1 changed files with 3 additions and 5 deletions
|
@ -31,6 +31,7 @@ use Friendica\Model\Item;
|
|||
use Friendica\Model\Post;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
use Friendica\Security\PermissionSet\Repository\PermissionSet;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -84,11 +85,8 @@ class Objects extends BaseModule
|
|||
$requester_id = Contact::getIdForURL($requester, $item['uid']);
|
||||
if (!empty($requester_id)) {
|
||||
$permissionSets = DI::permissionSet()->selectByContactId($requester_id, $item['uid']);
|
||||
if (!empty($permissionSets)) {
|
||||
$psid = array_merge($permissionSets->column('id'),
|
||||
[DI::permissionSet()->selectPublicForUser($item['uid'])]);
|
||||
$validated = in_array($item['psid'], $psid);
|
||||
}
|
||||
$psids = array_merge($permissionSets->column('id'), [PermissionSet::PUBLIC]);
|
||||
$validated = in_array($item['psid'], $psids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue