mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:50:10 +00:00
Add revoke follow feature
- Add new follow revoke module - Add new hooks: revoke_follow, support_follow, support_revoke_follow - Add link in contact page action menu
This commit is contained in:
parent
52b8cd054d
commit
72fae04e97
11 changed files with 272 additions and 16 deletions
|
@ -2047,15 +2047,16 @@ class Transmitter
|
|||
* @param string $target Target profile
|
||||
* @param $id
|
||||
* @param integer $uid User ID
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @return bool Operation success
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function sendContactReject($target, $id, $uid)
|
||||
public static function sendContactReject($target, $id, $uid): bool
|
||||
{
|
||||
$profile = APContact::getByURL($target);
|
||||
if (empty($profile['inbox'])) {
|
||||
Logger::warning('No inbox found for target', ['target' => $target, 'profile' => $profile]);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
$owner = User::getOwnerDataById($uid);
|
||||
|
@ -2075,7 +2076,7 @@ class Transmitter
|
|||
Logger::debug('Sending reject to ' . $target . ' for user ' . $uid . ' with id ' . $id);
|
||||
|
||||
$signed = LDSignature::sign($data, $owner);
|
||||
HTTPSignature::transmit($signed, $profile['inbox'], $uid);
|
||||
return HTTPSignature::transmit($signed, $profile['inbox'], $uid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue