[ActivityPub] Autofix profile URIs through alias discovering

Activitypub_profile:
- Add updateUri method

explorer:
- Add grab_aliases method
- Update grab_local_user's online course to grab and test aliases
This commit is contained in:
tenma
2020-03-27 19:25:43 +00:00
committed by Diogo Cordeiro
parent 2183875e9e
commit c6543e1f95
2 changed files with 89 additions and 58 deletions

View File

@@ -495,6 +495,21 @@ class Activitypub_profile extends Managed_DataObject
return $profile;
}
/**
* Update remote user profile URI in local instance
*
* @param string $uri
* @return void
* @throws Exception (if the update fails)
* @author Bruno Casteleiro <brunoccast@fc.up.pt>
*/
public function updateUri(string $uri)
{
$orig = clone($this);
$this->uri = $uri;
$this->updateWithKeys($orig);
}
/**
* Getter for the number of subscribers of a
* given local profile