aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzotdir.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-04-28 10:03:05 +0200
committerMario Vavti <mario@mariovavti.com>2023-04-28 10:03:05 +0200
commit13946b2b761d38bd7623cf2704616309922b75d7 (patch)
tree0fb390c2052c4394b51edfd8b6ff7261f989a8fa /Zotlabs/Lib/Libzotdir.php
parent29aa52df6a29042178cdc9e70fc51711e70a72ee (diff)
downloadvolse-hubzilla-13946b2b761d38bd7623cf2704616309922b75d7.tar.gz
volse-hubzilla-13946b2b761d38bd7623cf2704616309922b75d7.tar.bz2
volse-hubzilla-13946b2b761d38bd7623cf2704616309922b75d7.zip
fix and document edge case
Diffstat (limited to 'Zotlabs/Lib/Libzotdir.php')
-rw-r--r--Zotlabs/Lib/Libzotdir.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php
index 1b8d8436b..fd5778e5a 100644
--- a/Zotlabs/Lib/Libzotdir.php
+++ b/Zotlabs/Lib/Libzotdir.php
@@ -362,6 +362,14 @@ class Libzotdir {
self::delete_by_hash($ud['ud_hash']);
}
+ // backwards compatibility: Libzot::import_xchan(), where self::update() is called,
+ // will fail with versions < 8.4 if the channel has been locally deleted.
+ // In this case we will update the updates record here without bumping the date
+ // since we could not verify if anything changed.
+ if (!$xc['success'] && !empty($zf['data']['deleted_locally'])) {
+ self::update($ud['ud_hash'], $ud['ud_addr'], false);
+ }
+
// This is a workaround for a missing xchan_updated column
// TODO: implement xchan_updated in the xchan table and update this column instead
if($zf['data']['primary_location']['address'] && $zf['data']['primary_location']['url']) {