1
0
Fork 0

Merge pull request #9389 from annando/failed-contacts

Don't show failed contacts
This commit is contained in:
Hypolite Petovan 2020-10-08 07:53:05 -04:00 committed by GitHub
commit 01777dfd28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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]
];