Don't show failed contacts

2022.09-rc
Michael 2020-10-07 20:06:15 +00:00
rodzic 17b9c3542d
commit 00974324fe
7 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -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],
]);

Wyświetl plik

@ -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`

Wyświetl plik

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

Wyświetl plik

@ -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;
}

Wyświetl plik

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

Wyświetl plik

@ -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);

Wyświetl plik

@ -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]
];