Hi trying to do this but it doesn't work:
$eventParams = array(
'action' => 'friends_only',
'ownerId' => $data['action']['userId'],
'viewerId' => OW::getUser()->getId()
);
$permissions = OW::getEventManager()->getInstance()->call('privacy_check_permission', $eventParams);
print_r($permissions);
I'm trying to hide newsfeed comment field on all users except friends. In other words only friends can comment.
I can achieve this simply checking dB friends table but this will generate tons of queries imagine a query for each newsfeed post.
I assume privacy check uses cache.