aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-01-22 01:38:43 +0100
committerHilmar R <u02@u29lx193>2021-01-22 01:38:43 +0100
commit523765b968a5d94a98eee12854fc527d5abbc2e7 (patch)
treea71caba8943c674917821a4afd333eb39ac92b2e /Zotlabs/Lib/Activity.php
parent78f150cfbc1b713bfba3101fdc3f1fd624120637 (diff)
parent254e30bea173e350a24756cbd8cf4acdfe32933e (diff)
downloadvolse-hubzilla-523765b968a5d94a98eee12854fc527d5abbc2e7.tar.gz
volse-hubzilla-523765b968a5d94a98eee12854fc527d5abbc2e7.tar.bz2
volse-hubzilla-523765b968a5d94a98eee12854fc527d5abbc2e7.zip
Merge branch 'master' into air.5
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php26
1 files changed, 18 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 48714a48d..807216400 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]);
@@ -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
@@ -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;
}
@@ -1493,6 +1493,14 @@ class Activity {
if(! is_array($person_obj))
return;
+ $inbox = $person_obj['inbox'];
+
+ // invalid identity
+
+ if (! $inbox || strpos($inbox,z_root()) !== false) {
+ return;
+ }
+
$name = $person_obj['name'];
if(! $name)
$name = $person_obj['preferredUsername'];
@@ -1540,8 +1548,6 @@ class Activity {
$profile = $url;
}
- $inbox = $person_obj['inbox'];
-
$collections = [];
if($inbox) {
@@ -2137,7 +2143,7 @@ class Activity {
if(! $s['edited'])
$s['edited'] = $s['created'];
- $s['title'] = self::bb_content($content,'name');
+ $s['title'] = (($response_activity) ? EMPTY_STR : self::bb_content($content,'name'));
$s['summary'] = self::bb_content($content,'summary');
$s['body'] = ((self::bb_content($content,'bbcode') && (! $response_activity)) ? self::bb_content($content,'bbcode') : self::bb_content($content,'content'));
@@ -2642,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;
}
@@ -2654,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'];
@@ -2719,7 +2729,7 @@ class Activity {
foreach($arr as $url) {
- $n = ActivityStreams::fetch($url, $channel);
+ $n = self::fetch($url, $channel);
if(! $n) {
break;
}