aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-11-07 08:33:22 +0000
committerMario <mario@mariovavti.com>2023-11-07 08:33:22 +0000
commitc74068ae4d1b5af9dcaf9fac04cdabdcc5729b33 (patch)
treee024c1161664344bc699ed8741803e1ab4136140 /Zotlabs
parentca92dd02994b60c351efe7801bef0eeba2b9a9e9 (diff)
downloadvolse-hubzilla-c74068ae4d1b5af9dcaf9fac04cdabdcc5729b33.tar.gz
volse-hubzilla-c74068ae4d1b5af9dcaf9fac04cdabdcc5729b33.tar.bz2
volse-hubzilla-c74068ae4d1b5af9dcaf9fac04cdabdcc5729b33.zip
libzot: correctly attribute streams repeats
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Libzot.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index fba9f118e..13cc8b1ae 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1114,6 +1114,7 @@ class Libzot {
*/
static function import($arr) {
+
$env = $arr;
$private = false;
$return = [];
@@ -1219,13 +1220,20 @@ class Libzot {
return;
}
- $r = Activity::get_actor_hublocs($AS->actor['id']);
+ $author_url = $AS->actor['id'];
+
+ if ($AS->type === 'Announce') {
+ hz_syslog(print_r($AS, true));
+ $author_url = Activity::get_attributed_to_actor_url($AS);
+ }
+
+ $r = Activity::get_actor_hublocs($author_url);
- if (! $r) {
+ if (!$r) {
// Author is unknown to this site. Perform channel discovery and try again.
- $z = discover_by_webbie($AS->actor['id']);
+ $z = discover_by_webbie($author_url);
if ($z) {
- $r = Activity::get_actor_hublocs($AS->actor['id']);
+ $r = Activity::get_actor_hublocs($author_url);
}
}
@@ -1829,6 +1837,11 @@ class Libzot {
if ($r) {
// We already have this post.
+ // Dismiss its announce
+ if ($act->type === 'Announce') {
+ return;
+ }
+
$item_id = $r[0]['id'];
if (intval($r[0]['item_deleted'])) {