[TheFreeNetwork] Do not allow lower priority protocols to handle remote actors already handled by the higher ones
This commit is contained in:
@@ -285,8 +285,6 @@ class Activitypub_profile extends Managed_DataObject
|
||||
}
|
||||
|
||||
$aprofile->created = $aprofile->modified = common_sql_now();
|
||||
|
||||
$aprofile = new Activitypub_profile;
|
||||
$aprofile->profile_id = $profile->getID();
|
||||
$aprofile->uri = $url;
|
||||
$aprofile->nickname = $profile->getNickname();
|
||||
|
@@ -49,7 +49,7 @@ class Activitypub_postman
|
||||
* Create a postman to deliver something to someone
|
||||
*
|
||||
* @param Profile $from sender Profile
|
||||
* @param array $to receiver Profiles
|
||||
* @param array $to receiver AProfiles
|
||||
* @throws Exception
|
||||
* @author Diogo Cordeiro <diogo@fc.up.pt>
|
||||
*/
|
||||
|
@@ -287,7 +287,13 @@ class SalmonAction extends Action
|
||||
if (!$this->oprofile instanceof Ostatus_profile) {
|
||||
common_debug("We do not have a local profile to connect to this activity's author. Let's create one.");
|
||||
// ensureActivityObjectProfile throws exception on failure
|
||||
$this->oprofile = Ostatus_profile::ensureActivityObjectProfile($this->activity->actor);
|
||||
try {
|
||||
$this->oprofile = Ostatus_profile::ensureActivityObjectProfile($this->activity->actor);
|
||||
} catch (AlreadyHandledException $e) {
|
||||
// Some other federation protocol is handling this profile, let it go.
|
||||
common_debug('SalmonAction found that this actor already was handled by another federation protocol: ' . $e->getMessage());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user