From a70a0306d7773fb783240158ae1644824c308afd Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Sep 2019 08:58:56 +0000 Subject: [PATCH] Only show incoming pending contact requests with intro --- src/Module/Contact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 331da1281..0b27f0e4a 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -642,8 +642,8 @@ class Contact extends BaseModule $sql_extra = " AND `archive` AND NOT `blocked`"; break; case 'pending': - $sql_extra = " AND `pending` AND NOT `archive` - AND NOT EXISTS (SELECT `id` FROM `intro` WHERE `contact-id` = `contact`.`id` AND `ignore`)"; + $sql_extra = sprintf(" AND `pending` AND NOT `archive` AND ((`rel` = %d) + OR EXISTS (SELECT `id` FROM `intro` WHERE `contact-id` = `contact`.`id` AND NOT `ignore`))", Model\Contact::SHARING); break; default: $sql_extra = " AND NOT `archive` AND NOT `blocked` AND NOT `pending`";