]> git.mxchange.org Git - friendica.git/commitdiff
Only include natively supported protocol contacts in meta-groups
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 17 Jul 2019 00:23:19 +0000 (20:23 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 30 Jul 2019 00:31:48 +0000 (20:31 -0400)
src/Model/Group.php

index 5c587ee2a6f330b8bd2d1e7e73f0abe90a41dd0c..a9d2f462e653dfc3e07be5c54ecf973f8f8c978c 100644 (file)
@@ -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'];