Don't show failed contacts

This commit is contained in:
Michael 2020-10-07 20:06:15 +00:00
parent 17b9c3542d
commit 00974324fe
7 changed files with 9 additions and 4 deletions

View File

@ -66,6 +66,7 @@ class ContactBlock
'pending' => false,
'hidden' => false,
'archive' => false,
'failed' => false,
'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::FEED],
]);

View File

@ -82,6 +82,7 @@ class Group
AND NOT `deleted`
AND NOT `blocked`
AND NOT `pending`
AND NOT `failed`
AND `id` NOT IN (
SELECT DISTINCT(`contact-id`)
FROM `group_member`

View File

@ -406,6 +406,7 @@ class Profile
'pending' => false,
'hidden' => false,
'archive' => false,
'failed' => false,
'network' => Protocol::FEDERATED,
]);
}

View File

@ -652,15 +652,15 @@ class Contact extends BaseModule
array_unshift($sql_values, 0);
break;
case 'archived':
$sql_extra = " AND `archive` AND NOT `blocked` AND NOT `pending`";
$sql_extra = " AND (`archive` OR `failed`) AND NOT `blocked` AND NOT `pending`";
break;
case 'pending':
$sql_extra = " AND `pending` AND NOT `archive` AND ((`rel` = ?)
$sql_extra = " AND `pending` AND NOT `archive` AND NOT `failed` AND ((`rel` = ?)
OR EXISTS (SELECT `id` FROM `intro` WHERE `contact-id` = `contact`.`id` AND NOT `ignore`))";
$sql_values[] = Model\Contact::SHARING;
break;
default:
$sql_extra = " AND NOT `archive` AND NOT `blocked` AND NOT `pending`";
$sql_extra = " AND NOT `archive` AND NOT `blocked` AND NOT `pending` AND NOT `failed`";
break;
}

View File

@ -41,6 +41,7 @@ class Contacts extends BaseModule
'blocked' => false,
'self' => false,
'hidden' => false,
'failed' => false,
];
$noresult_label = DI::l10n()->t('No known contacts.');

View File

@ -319,7 +319,7 @@ class Group extends BaseModule
$contacts = Model\Contact\Group::listUngrouped(local_user());
} else {
$contacts_stmt = DBA::select('contact', [],
['uid' => local_user(), 'pending' => false, 'blocked' => false, 'self' => false],
['uid' => local_user(), 'pending' => false, 'blocked' => false, 'failed' => false, 'self' => false],
['order' => ['name']]
);
$contacts = DBA::toArray($contacts_stmt);

View File

@ -69,6 +69,7 @@ class Contacts extends Module\BaseProfile
'pending' => false,
'hidden' => false,
'archive' => false,
'failed' => false,
'self' => false,
'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, Protocol::FEED]
];