* 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]);
}
if (in_array($protocol, [Protocol::DIASPORA, Protocol::ACTIVITYPUB])) {
- if ($introduction->duplex) {
+ if ($duplex) {
$newRelation = Contact::FRIEND;
} else {
$newRelation = Contact::FOLLOWER;
use Friendica\BaseModule;
use Friendica\DI;
+use Friendica\Model\Contact;
/**
* Process follow request confirmations
$intro = DI::intro()->selectOneById($intro_id, local_user());
- $intro->confirm($duplex, $hidden);
+ Contact\Introduction::confirm($intro, $duplex, $hidden);
DI::baseUrl()->redirect('contact/' . $intro->cid);
}