From f59aefd3d9d8191409edeb1bfdba3f16f0af9b12 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 23 Nov 2020 09:10:53 +0000 Subject: store actor of fetched acivities --- Zotlabs/Lib/Activity.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 5f222754b..5751d276a 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -2648,7 +2648,7 @@ class Activity { $current_item = $item; while($current_item['parent_mid'] !== $current_item['mid']) { - $n = ActivityStreams::fetch($current_item['parent_mid'], $channel); + $n = self::fetch($current_item['parent_mid'], $channel); if(! $n) { break; } @@ -2660,6 +2660,10 @@ class Activity { break; } + if (is_array($a->actor) && array_key_exists('id',$a->actor)) { + self::actor_store($a->actor['id'],$a->actor); + } + $replies = null; if(isset($a->obj['replies']['first']['items'])) { $replies = $a->obj['replies']['first']['items']; @@ -2725,7 +2729,7 @@ class Activity { foreach($arr as $url) { - $n = ActivityStreams::fetch($url, $channel); + $n = self::fetch($url, $channel); if(! $n) { break; } -- cgit v1.2.3 From 453dd38e51a5fe20bb34396ecc5f11e345196322 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 23 Nov 2020 14:01:04 +0000 Subject: missing include --- Zotlabs/Lib/Activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 5751d276a..3006c6789 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -168,7 +168,7 @@ class Activity { ); if($r) { xchan_query($r,true); - $r = fetch_post_tags($r,true); + $r = fetch_post_tags($r); if (in_array($r[0]['verb'], ['Create', 'Invite']) && $r[0]['obj_type'] === ACTIVITY_OBJ_EVENT) { $r[0]['verb'] = 'Invite'; return self::encode_activity($r[0]); -- cgit v1.2.3 From 891b1428cc3a5aade0754acffa1a516c5896b46a Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 23 Nov 2020 18:23:46 +0000 Subject: do not use chanlink_url() at this place --- Zotlabs/Lib/Activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 3006c6789..a655a895c 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -713,7 +713,7 @@ class Activity { ); if($p) { xchan_query($p,true); - $p = fetch_post_tags($p,true); + $p = fetch_post_tags($p); $i['obj'] = self::encode_item($p[0]); // convert to zot6 emoji reaction encoding which uses the target object to indicate the -- cgit v1.2.3 From c648c38fb08c4f7aa9eee133d7f5f3efd32f9bd9 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 23 Nov 2020 20:23:17 +0000 Subject: fix warning --- Zotlabs/Lib/Activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index a655a895c..f805b92e7 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -800,7 +800,7 @@ class Activity { $is_directmessage = false; $recips = get_iconfig($i['parent'], 'activitypub', 'recips'); - if(in_array($i['author']['xchan_url'], $recips['to'])) { + if(array_path_exists('to', $recips) && in_array($i['author']['xchan_url'], $recips['to'])) { $reply_url = $d[0]['xchan_url']; $is_directmessage = true; } -- cgit v1.2.3