diff --git a/src/Model/Contact/Introduction.php b/src/Model/Contact/Introduction.php index 7524711371..f27a4a6ba8 100644 --- a/src/Model/Contact/Introduction.php +++ b/src/Model/Contact/Introduction.php @@ -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 + * @param bool $hidden * * @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 = false): 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; diff --git a/src/Module/FollowConfirm.php b/src/Module/FollowConfirm.php index f028a3d388..3015c3b649 100644 --- a/src/Module/FollowConfirm.php +++ b/src/Module/FollowConfirm.php @@ -3,6 +3,7 @@ namespace Friendica\Module; use Friendica\BaseModule; use Friendica\DI; +use Friendica\Model\Contact; /** * Process follow request confirmations @@ -23,7 +24,7 @@ class FollowConfirm extends BaseModule $intro = DI::intro()->selectOneById($intro_id, local_user()); - $intro->confirm($duplex, $hidden); + Contact\Introduction::confirm($intro, $duplex, $hidden); DI::baseUrl()->redirect('contact/' . $intro->cid); }