aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-10-02 12:09:23 +0000
committerMario <mario@mariovavti.com>2020-10-02 12:09:23 +0000
commit72c6d3e7baafd259ac00bcd2ff2da31c17e062f6 (patch)
tree0834f85f38b531d940b76e69a701aab13119cb60 /Zotlabs/Lib/Libzot.php
parent86117c88595cf97a6173fabcb9e3b0d5ec6b1d09 (diff)
downloadvolse-hubzilla-72c6d3e7baafd259ac00bcd2ff2da31c17e062f6.tar.gz
volse-hubzilla-72c6d3e7baafd259ac00bcd2ff2da31c17e062f6.tar.bz2
volse-hubzilla-72c6d3e7baafd259ac00bcd2ff2da31c17e062f6.zip
item/activity fetching
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 87da5ff7a..d7285ca12 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1496,13 +1496,14 @@ class Libzot {
// Try again using the delivery channel credentials.
// We will also need to re-parse the $item array,
// but preserve any values that were set during anonymous parsing.
-
+
$o = Activity::fetch($act->obj,$channel);
if($o) {
$act->obj = $o;
$arr = array_merge(Activity::decode_note($act),$arr);
}
else {
+
$DR->update('Incomplete or corrupt activity');
$result[] = $DR->get();
continue;
@@ -2116,6 +2117,10 @@ class Libzot {
$item_found = false;
$post_id = 0;
+ $m = parse_url($item['mid']);
+ unset($m['fragment']);
+ $normalised = unparse_url($m);
+
// reactions such as like and dislike could have an mid with /activity/ in it.
// Check for both forms in order to prevent duplicates.
@@ -2124,8 +2129,8 @@ class Libzot {
dbesc($sender),
dbesc($sender),
dbesc($sender),
- dbesc(str_replace('/activity/', '/item/', $item['mid'])),
- dbesc(str_replace('/item/', '/activity/', $item['mid'])),
+ dbesc($normalised),
+ dbesc(str_replace('/activity/', '/item/', $normalised)),
intval($uid)
);