Merge pull request #9389 from annando/failed-contacts
Don't show failed contacts
This commit is contained in:
commit
01777dfd28
|
@ -66,6 +66,7 @@ class ContactBlock
|
||||||
'pending' => false,
|
'pending' => false,
|
||||||
'hidden' => false,
|
'hidden' => false,
|
||||||
'archive' => false,
|
'archive' => false,
|
||||||
|
'failed' => false,
|
||||||
'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::FEED],
|
'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::FEED],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ class Group
|
||||||
AND NOT `deleted`
|
AND NOT `deleted`
|
||||||
AND NOT `blocked`
|
AND NOT `blocked`
|
||||||
AND NOT `pending`
|
AND NOT `pending`
|
||||||
|
AND NOT `failed`
|
||||||
AND `id` NOT IN (
|
AND `id` NOT IN (
|
||||||
SELECT DISTINCT(`contact-id`)
|
SELECT DISTINCT(`contact-id`)
|
||||||
FROM `group_member`
|
FROM `group_member`
|
||||||
|
|
|
@ -406,6 +406,7 @@ class Profile
|
||||||
'pending' => false,
|
'pending' => false,
|
||||||
'hidden' => false,
|
'hidden' => false,
|
||||||
'archive' => false,
|
'archive' => false,
|
||||||
|
'failed' => false,
|
||||||
'network' => Protocol::FEDERATED,
|
'network' => Protocol::FEDERATED,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,15 +652,15 @@ class Contact extends BaseModule
|
||||||
array_unshift($sql_values, 0);
|
array_unshift($sql_values, 0);
|
||||||
break;
|
break;
|
||||||
case 'archived':
|
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;
|
break;
|
||||||
case 'pending':
|
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`))";
|
OR EXISTS (SELECT `id` FROM `intro` WHERE `contact-id` = `contact`.`id` AND NOT `ignore`))";
|
||||||
$sql_values[] = Model\Contact::SHARING;
|
$sql_values[] = Model\Contact::SHARING;
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ class Contacts extends BaseModule
|
||||||
'blocked' => false,
|
'blocked' => false,
|
||||||
'self' => false,
|
'self' => false,
|
||||||
'hidden' => false,
|
'hidden' => false,
|
||||||
|
'failed' => false,
|
||||||
];
|
];
|
||||||
|
|
||||||
$noresult_label = DI::l10n()->t('No known contacts.');
|
$noresult_label = DI::l10n()->t('No known contacts.');
|
||||||
|
|
|
@ -319,7 +319,7 @@ class Group extends BaseModule
|
||||||
$contacts = Model\Contact\Group::listUngrouped(local_user());
|
$contacts = Model\Contact\Group::listUngrouped(local_user());
|
||||||
} else {
|
} else {
|
||||||
$contacts_stmt = DBA::select('contact', [],
|
$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']]
|
['order' => ['name']]
|
||||||
);
|
);
|
||||||
$contacts = DBA::toArray($contacts_stmt);
|
$contacts = DBA::toArray($contacts_stmt);
|
||||||
|
|
|
@ -69,6 +69,7 @@ class Contacts extends Module\BaseProfile
|
||||||
'pending' => false,
|
'pending' => false,
|
||||||
'hidden' => false,
|
'hidden' => false,
|
||||||
'archive' => false,
|
'archive' => false,
|
||||||
|
'failed' => false,
|
||||||
'self' => false,
|
'self' => false,
|
||||||
'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, Protocol::FEED]
|
'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, Protocol::FEED]
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue