]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact/Introduction.php
Merge remote-tracking branch 'upstream/develop' into logging
[friendica.git] / src / Model / Contact / Introduction.php
index 7524711371c1be85736a4c864b442a255122483d..b85e90eaed3c2ffe62855157e4adfba03486367f 100644 (file)
@@ -37,12 +37,14 @@ class Introduction
         * Confirms a follow request and sends a notice to the remote contact.
         *
         * @param Entity\Introduction $introduction
+        * @param bool                $duplex       Is it a follow back?
+        * @param bool|null           $hidden       Should this contact be hidden? null = no change
         *
         * @throws HTTPException\InternalServerErrorException
         * @throws HTTPException\NotFoundException
         * @throws \ImagickException
         */
-       public static function confirm(Entity\Introduction $introduction): void
+       public static function confirm(Entity\Introduction $introduction, bool $duplex = false, ?bool $hidden = null): void
        {
                DI::logger()->info('Confirming follower', ['cid' => $introduction->cid]);
 
@@ -66,7 +68,7 @@ class Introduction
                }
 
                if (in_array($protocol, [Protocol::DIASPORA, Protocol::ACTIVITYPUB])) {
-                       if ($introduction->duplex) {
+                       if ($duplex) {
                                $newRelation = Contact::FRIEND;
                        } else {
                                $newRelation = Contact::FOLLOWER;