<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
* Confirms a follow request and sends a notice to the remote contact.
*
* @param Entity\Introduction $introduction
- * @param bool $duplex
- * @param bool $hidden
+ * @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, bool $duplex = false, bool $hidden = false): void
+ public static function confirm(Entity\Introduction $introduction, bool $duplex = false, ?bool $hidden = null): void
{
DI::logger()->info('Confirming follower', ['cid' => $introduction->cid]);
}
if ($protocol == Protocol::ACTIVITYPUB) {
- ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $contact['uid']);
+ $owner = User::getOwnerDataById($contact['uid']);
+ if ($owner) {
+ ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $owner);
+ }
}
}
}