Hide blocked contacts when searching public contacts

This commit is contained in:
Michael 2021-10-13 21:04:46 +00:00
parent 2904f4ca0e
commit 8d7846142d
1 changed files with 4 additions and 0 deletions

View File

@ -3024,6 +3024,10 @@ class Contact
$condition = ['network' => $networks, 'failed' => false, 'deleted' => false, 'uid' => $uid];
if ($uid == 0) {
$condition['blocked'] = false;
}
// check if we search only communities or every contact
if ($mode === 'community') {
$condition['contact-type'] = self::TYPE_COMMUNITY;