diff options
author | Mario <mario@mariovavti.com> | 2021-09-15 10:59:16 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-15 10:59:16 +0000 |
commit | 46b8db53ab021be06f6dd9c15e6b69c22609aa0f (patch) | |
tree | 8d4de70028a74e17068f4451a67e4d8a17c7b30c /Zotlabs/Lib/Activity.php | |
parent | 0b716b3cc7953ef1226b9f8fcee9f746ee1aade1 (diff) | |
download | volse-hubzilla-46b8db53ab021be06f6dd9c15e6b69c22609aa0f.tar.gz volse-hubzilla-46b8db53ab021be06f6dd9c15e6b69c22609aa0f.tar.bz2 volse-hubzilla-46b8db53ab021be06f6dd9c15e6b69c22609aa0f.zip |
provide a get_cached_actor_provider hook and improve the author/owner handling in Libzot::import()
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 62a22f70e..a0a9a7c7f 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -3548,7 +3548,21 @@ class Activity { } static function get_cached_actor($id) { - return (XConfig::Get($id,'system','actor_record')); + $actor = XConfig::Get($id,'system', 'actor_record'); + + if ($actor) { + return $actor; + } + + // try other get_cached_actor providers (e.g. diaspora) + $hookdata = [ + 'id' => $id, + 'actor' => false + ]; + + call_hooks('get_cached_actor_provider', $hookdata); + + return $hookdata['actor']; } static function get_actor_hublocs($url, $options = 'all') { |