]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Group.php
Remove next link when there aren't any introductions in Module\Api\Mastodon\FollowReq...
[friendica.git] / src / Model / Group.php
index a810fff6707708ecbcc43f31cf6d3b54376258b4..199ff1ebd7e112950286b5889cac3b56e18e61d3 100644 (file)
@@ -6,11 +6,11 @@
 namespace Friendica\Model;
 
 use Friendica\BaseModule;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
+use Friendica\DI;
 
 /**
  * functions for interacting with the group database table
@@ -117,6 +117,16 @@ class Group
                }
                DBA::close($stmt);
 
+               // Meta-groups
+               $contact = Contact::getById($cid, ['rel']);
+               if ($contact['rel'] == Contact::FOLLOWER || $contact['rel'] == Contact::FRIEND) {
+                       $return[] = self::FOLLOWERS;
+               }
+
+               if ($contact['rel'] == Contact::FRIEND) {
+                       $return[] = self::MUTUALS;
+               }
+
                return $return;
        }