[ActivityPub] Fix use of ActivityPubPlugin::pull_remote_profile
It does not throw but return null.
This commit is contained in:
parent
160b6ccd94
commit
04018ea4ca
@ -752,10 +752,10 @@ class ActivityPubPlugin extends Plugin
|
|||||||
*/
|
*/
|
||||||
public function onStartCommandGetProfile($command, $arg, &$profile)
|
public function onStartCommandGetProfile($command, $arg, &$profile)
|
||||||
{
|
{
|
||||||
try {
|
$aprofile = self::pull_remote_profile($arg);
|
||||||
$aprofile = $this->pull_remote_profile($arg);
|
if ($aprofile instanceof Activitypub_profile) {
|
||||||
$profile = $aprofile->local_profile();
|
$profile = $aprofile->local_profile();
|
||||||
} catch (Exception $e) {
|
} else {
|
||||||
// No remote ActivityPub profile found
|
// No remote ActivityPub profile found
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -795,12 +795,10 @@ class ActivityPubPlugin extends Plugin
|
|||||||
*/
|
*/
|
||||||
public function onRemoteFollowPullProfile(string $uri, ?Profile &$profile): bool
|
public function onRemoteFollowPullProfile(string $uri, ?Profile &$profile): bool
|
||||||
{
|
{
|
||||||
try {
|
$aprofile = self::pull_remote_profile($uri);
|
||||||
$aprofile = $this->pull_remote_profile($uri);
|
if ($aprofile instanceof Activitypub_profile) {
|
||||||
if ($aprofile instanceof Activitypub_profile) {
|
$profile = $aprofile->local_profile();
|
||||||
$profile = $aprofile->local_profile();
|
} else {
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
// No remote ActivityPub profile found
|
// No remote ActivityPub profile found
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user