From 4e427f615b583b453b94e5f2c1908fe6bc5ae773 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 16 Jul 2019 20:23:19 -0400 Subject: [PATCH] Only include natively supported protocol contacts in meta-groups --- src/Model/Group.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Model/Group.php b/src/Model/Group.php index 5c587ee2a6..a9d2f462e6 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -8,6 +8,7 @@ use Friendica\BaseModule; use Friendica\BaseObject; use Friendica\Core\L10n; use Friendica\Core\Logger; +use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Database\DBA; @@ -332,7 +333,11 @@ class Group extends BaseObject $key = array_search(self::FOLLOWERS, $group_ids); if ($key !== false) { - $followersStmt = Contact::select(['id'], ['uid' => $uid, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]); + $followersStmt = Contact::select(['id'], [ + 'uid' => $uid, + 'rel' => [Contact::FOLLOWER, Contact::FRIEND], + 'protocol' => Protocol::NATIVE_SUPPORT, + ]); while($follower = DBA::fetch($followersStmt)) { $return[] = $follower['id']; @@ -343,7 +348,11 @@ class Group extends BaseObject $key = array_search(self::MUTUALS, $group_ids); if ($key !== false) { - $mutualsStmt = Contact::select(['id'], ['uid' => $uid, 'rel' => [Contact::FRIEND]]); + $mutualsStmt = Contact::select(['id'], [ + 'uid' => $uid, + 'rel' => [Contact::FRIEND], + 'protocol' => Protocol::NATIVE_SUPPORT, + ]); while($mutual = DBA::fetch($mutualsStmt)) { $return[] = $mutual['id'];