return true;
}
- $result = null;
- Hook::callAll('support_follow', $result);
+ $hook_data = [
+ 'protocol' => $protocol,
+ 'result' => null
+ ];
+ Hook::callAll('support_follow', $hook_data);
- return $result === true;
+ return $hook_data['result'] === true;
}
/**
return true;
}
- $result = null;
- Hook::callAll('support_revoke_follow', $result);
+ $hook_data = [
+ 'protocol' => $protocol,
+ 'result' => null
+ ];
+ Hook::callAll('support_revoke_follow', $hook_data);
- return $result === true;
+ return $hook_data['result'] === true;
}
/**
*
* @param array $user User unfriending
* @param array $contact Contact unfriended
- * @return bool|null true if successful, false if not, null if no action was performed
+ * @return bool|null true if successful, false if not, null if no remote action was performed
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
- public static function terminateFriendship(array $user, array $contact): bool
+ public static function terminateFriendship(array $user, array $contact): ?bool
{
if (empty($contact['network'])) {
throw new \InvalidArgumentException('Missing network key in contact array');
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
- public static function revokeFollow(array $contact)
+ public static function revokeFollow(array $contact): ?bool
{
if (empty($contact['network'])) {
throw new \InvalidArgumentException('Missing network key in contact array');