]> git.mxchange.org Git - friendica.git/commitdiff
Don't show failed contacts
authorMichael <heluecht@pirati.ca>
Wed, 7 Oct 2020 20:06:15 +0000 (20:06 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 7 Oct 2020 20:06:15 +0000 (20:06 +0000)
src/Content/Widget/ContactBlock.php
src/Model/Contact/Group.php
src/Model/Profile.php
src/Module/Contact.php
src/Module/Contact/Contacts.php
src/Module/Group.php
src/Module/Profile/Contacts.php

index 85c722c8a02afc326916cd609c1d1640e53be198..9e74a16115c459429fa2c551c7ea626a08fc6d85 100644 (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],
                ]);
 
index b2d165f6a7f6426506f598356dd056bd791dc469..5bf1dce507017ba9998fc863a974185a537c77ab 100644 (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`
index 4d44a56a04c5286bb941ba9dcb6da13665679d63..e98f0048ee809f58b990dbc944082550618ad612 100644 (file)
@@ -406,6 +406,7 @@ class Profile
                                        'pending' => false,
                                        'hidden' => false,
                                        'archive' => false,
+                                       'failed' => false,
                                        'network' => Protocol::FEDERATED,
                                ]);
                        }
index cc4f4d9abedda01c6bca64dfee34eb96dff3c7fc..85b3bb423937f3b582c999725a0b0fed751c29bf 100644 (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;
                }
 
index 355619c712d2daf4b874229f05552becb1d82d26..e328b978ce2b0b2aecbd2b32516a2febb97212fe 100644 (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.');
index e22163ecc31e98d1eaeb423b928558ba7f2d0c41..8da062a93e9dfbfb9619725e45e4245164aa23d7 100644 (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);
index 959552542f59a0c04a910ce9e9bea338cb31fb35..654414f35cc161717eee285588d3b9a6b2b21495 100644 (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]
                ];