aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-04-01 09:50:12 +0000
committerMario <mario@mariovavti.com>2022-04-01 09:50:12 +0000
commit38d977e54612e0cfbe69aae47c656f1cada037c6 (patch)
tree9f05d6f981436a4f1c0590f4068409c065e3a8a4 /Zotlabs/Lib
parent3e38a24f0a28e9ad25dc322441ba45adf3bf2c02 (diff)
downloadvolse-hubzilla-38d977e54612e0cfbe69aae47c656f1cada037c6.tar.gz
volse-hubzilla-38d977e54612e0cfbe69aae47c656f1cada037c6.tar.bz2
volse-hubzilla-38d977e54612e0cfbe69aae47c656f1cada037c6.zip
fixes in regard to hub re-installs: dismiss deleted hublocs, make sure we use the latest hubloc entry for addressing, in Queue::deliver() prefer primaries since their info is probably more accurate
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php4
-rw-r--r--Zotlabs/Lib/Queue.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 0c25605e7..7663131bb 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -567,7 +567,7 @@ class Activity {
}
}
}
- $d = q("select hubloc.* from hubloc left join item on hubloc_hash = owner_xchan where item.id = %d limit 1",
+ $d = q("select hubloc.* from hubloc left join item on hubloc_hash = owner_xchan where item.id = %d and hubloc_deleted = 0 order by hubloc_id desc limit 1",
intval($i['parent'])
);
if ($d) {
@@ -980,7 +980,7 @@ class Activity {
}
}
- $d = q("select hubloc.* from hubloc left join item on hubloc_hash = owner_xchan where item.id = %d limit 1",
+ $d = q("select hubloc.* from hubloc left join item on hubloc_hash = owner_xchan where item.id = %d and hubloc_deleted = 0 order by hubloc_id desc limit 1",
intval($i['parent'])
);
if ($d) {
diff --git a/Zotlabs/Lib/Queue.php b/Zotlabs/Lib/Queue.php
index e03816f05..246b42667 100644
--- a/Zotlabs/Lib/Queue.php
+++ b/Zotlabs/Lib/Queue.php
@@ -202,7 +202,7 @@ class Queue {
if($channel && $base) {
$h = q("SELECT hubloc_sitekey, site_crypto FROM hubloc LEFT JOIN site ON hubloc_url = site_url
- WHERE site_url = '%s' AND hubloc_network = 'zot6' ORDER BY hubloc_id DESC LIMIT 1",
+ WHERE site_url = '%s' AND hubloc_network = 'zot6' AND hubloc_deleted = 0 ORDER BY hubloc_primary DESC, hubloc_id DESC LIMIT 1",
dbesc($base)
);
if($h) {