forked from GNUsocial/gnu-social
[TheFreeNetwork] Fix small logic issue regarding StartTFNLookup return
This commit is contained in:
parent
1967f46a69
commit
6526bdc824
@ -86,7 +86,7 @@ class TheFreeNetworkModule extends Module
|
|||||||
$profile_id = $this->lookup($uri, $class, true);
|
$profile_id = $this->lookup($uri, $class, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return is_null($profile_id);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -148,7 +148,8 @@ class Activitypub_profile extends Managed_DataObject
|
|||||||
public function do_insert()
|
public function do_insert()
|
||||||
{
|
{
|
||||||
// Does any other protocol have this remote entity we're about to add ?
|
// 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
|
// Yes! Avoid creating a new profile
|
||||||
$this->profile_id = $profile_id;
|
$this->profile_id = $profile_id;
|
||||||
$this->created = $this->modified = common_sql_now();
|
$this->created = $this->modified = common_sql_now();
|
||||||
|
@ -1209,7 +1209,8 @@ class Ostatus_profile extends Managed_DataObject
|
|||||||
if ($object->type == ActivityObject::PERSON) {
|
if ($object->type == ActivityObject::PERSON) {
|
||||||
|
|
||||||
// Does any other protocol have this remote entity we're about to add ?
|
// 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!
|
$tfn = true; // been here!
|
||||||
|
|
||||||
// Yes! Avoid creating a new profile
|
// Yes! Avoid creating a new profile
|
||||||
|
Loading…
Reference in New Issue
Block a user