diff --git a/modules/TheFreeNetwork/TheFreeNetworkModule.php b/modules/TheFreeNetwork/TheFreeNetworkModule.php index 9706bddd85..d8c1873c60 100644 --- a/modules/TheFreeNetwork/TheFreeNetworkModule.php +++ b/modules/TheFreeNetwork/TheFreeNetworkModule.php @@ -86,7 +86,7 @@ class TheFreeNetworkModule extends Module $profile_id = $this->lookup($uri, $class, true); } - return is_null($profile_id); + return false; } /** diff --git a/plugins/ActivityPub/classes/Activitypub_profile.php b/plugins/ActivityPub/classes/Activitypub_profile.php index 9c16209632..d576d13e69 100644 --- a/plugins/ActivityPub/classes/Activitypub_profile.php +++ b/plugins/ActivityPub/classes/Activitypub_profile.php @@ -148,7 +148,8 @@ class Activitypub_profile extends Managed_DataObject public function do_insert() { // Does any other protocol have this remote entity we're about to add ? - if (!Event::handle('StartTFNLookup', [$this->uri, get_class($this), &$profile_id])) { + Event::handle('StartTFNLookup', [$this->uri, get_class($this), &$profile_id]); + if (!is_null($profile_id)) { // Yes! Avoid creating a new profile $this->profile_id = $profile_id; $this->created = $this->modified = common_sql_now(); diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index d414c4b437..14ad1cb82c 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1209,7 +1209,8 @@ class Ostatus_profile extends Managed_DataObject if ($object->type == ActivityObject::PERSON) { // Does any other protocol have this remote entity we're about to add ? - if (!Event::handle('StartTFNLookup', [$oprofile->uri, get_called_class(), &$profile_id])) { + Event::handle('StartTFNLookup', [$oprofile->uri, get_called_class(), &$profile_id]); + if (!is_null($profile_id)) { $tfn = true; // been here! // Yes! Avoid creating a new profile