fix(contacts): not contact, not local

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2025-11-06 09:22:02 -01:00
parent 22ca454130
commit b28176458d
5 changed files with 5 additions and 6 deletions

View file

@ -501,7 +501,7 @@ class Provider implements IProvider {
'strict_search' => true,
]);
foreach ($addressBookContacts as $contact) {
if (isset($contact['isLocalSystemBook'])) {
if (isset($contact['isLocalSystemBook']) || isset($contact['isVirtualAddressbook'])) {
continue;
}

View file

@ -160,7 +160,7 @@ abstract class Base implements IProvider {
'strict_search' => true,
]);
foreach ($addressBookContacts as $contact) {
if (isset($contact['isLocalSystemBook'])) {
if (isset($contact['isLocalSystemBook']) || isset($contact['isVirtualAddressbook'])) {
continue;
}

View file

@ -287,7 +287,7 @@ class Activity implements IProvider {
]);
foreach ($addressBookContacts as $contact) {
if (isset($contact['isLocalSystemBook'])) {
if (isset($contact['isLocalSystemBook']) || isset($contact['isVirtualAddressbook'])) {
continue;
}

View file

@ -49,7 +49,7 @@ class RemotePlugin implements ISearchPlugin {
'fullmatch' => false,
]);
foreach ($addressBookContacts as $contact) {
if (isset($contact['isLocalSystemBook'])) {
if (isset($contact['isLocalSystemBook']) || isset($contact['isVirtualAddressbook'])) {
continue;
}
if (isset($contact['CLOUD'])) {

View file

@ -305,8 +305,7 @@ class ContactsStore implements IContactsStore {
}
}
if ($shareType === 0 || $shareType === 6) {
$isLocal = $contact['isLocalSystemBook'] ?? false;
if ($contact['UID'] === $shareWith && $isLocal === true) {
if (($contact['isLocalSystemBook'] ?? false) === true && $contact['UID'] === $shareWith) {
$match = $contact;
break;
}