From 13946b2b761d38bd7623cf2704616309922b75d7 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 28 Apr 2023 10:03:05 +0200 Subject: fix and document edge case --- Zotlabs/Lib/Libzotdir.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Zotlabs/Lib') 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']) { -- cgit v1.2.3