From 67aaa979049ea2666da1fb313b2b095e27422128 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 26 Oct 2023 16:06:15 +0200 Subject: remove the directory updates entry if the channel was removed --- Zotlabs/Lib/Libzotdir.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php index 58138850c..ca3902a9e 100644 --- a/Zotlabs/Lib/Libzotdir.php +++ b/Zotlabs/Lib/Libzotdir.php @@ -362,12 +362,9 @@ 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); + // if the channel was deleted - delete the entry in updates + if (!empty($zf['data']['deleted_locally'])) { + self::delete_by_hash($ud['ud_hash']); } // This is a workaround for a missing xchan_updated column -- cgit v1.2.3