aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-15 10:59:16 +0000
committerMario <mario@mariovavti.com>2021-09-15 10:59:16 +0000
commit46b8db53ab021be06f6dd9c15e6b69c22609aa0f (patch)
tree8d4de70028a74e17068f4451a67e4d8a17c7b30c /Zotlabs/Lib/Activity.php
parent0b716b3cc7953ef1226b9f8fcee9f746ee1aade1 (diff)
downloadvolse-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.php16
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') {