aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-09-30 10:10:49 +0000
committerMario <mario@mariovavti.com>2020-09-30 10:10:49 +0000
commitb878b6902817c7f442281cef30d346bd2a60659f (patch)
treef91fca9fcabcdbd55c8a3e6895d3101292c03a0a /Zotlabs/Lib/Libzot.php
parent48440e368c07855285da35ea9d0875196919a70d (diff)
downloadvolse-hubzilla-b878b6902817c7f442281cef30d346bd2a60659f.tar.gz
volse-hubzilla-b878b6902817c7f442281cef30d346bd2a60659f.tar.bz2
volse-hubzilla-b878b6902817c7f442281cef30d346bd2a60659f.zip
5.0RC testing: fix issue in relation with deletes
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index ce9536cd4..a6db9e431 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -2116,12 +2116,16 @@ class Libzot {
$item_found = false;
$post_id = 0;
+ // reactions such as like and dislike could have an mid with /activity/ in it.
+ // Check for both forms in order to prevent duplicates.
+
$r = q("select * from item where ( author_xchan = '%s' or owner_xchan = '%s' or source_xchan = '%s' )
- and mid = '%s' and uid = %d limit 1",
+ and mid IN ('%s', '%s') and uid = %d limit 1",
dbesc($sender),
dbesc($sender),
dbesc($sender),
dbesc($item['mid']),
+ dbesc(str_replace('/activity/', '/item/', $item['mid'])),
intval($uid)
);