diff options
author | Mario Vavti <mario@mariovavti.com> | 2023-04-28 10:03:05 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2023-04-28 10:03:05 +0200 |
commit | 13946b2b761d38bd7623cf2704616309922b75d7 (patch) | |
tree | 0fb390c2052c4394b51edfd8b6ff7261f989a8fa | |
parent | 29aa52df6a29042178cdc9e70fc51711e70a72ee (diff) | |
download | volse-hubzilla-13946b2b761d38bd7623cf2704616309922b75d7.tar.gz volse-hubzilla-13946b2b761d38bd7623cf2704616309922b75d7.tar.bz2 volse-hubzilla-13946b2b761d38bd7623cf2704616309922b75d7.zip |
fix and document edge case
-rw-r--r-- | Zotlabs/Lib/Libzotdir.php | 8 | ||||
-rw-r--r-- | Zotlabs/Module/Dirsearch.php | 2 |
2 files changed, 9 insertions, 1 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']) { diff --git a/Zotlabs/Module/Dirsearch.php b/Zotlabs/Module/Dirsearch.php index d4af0f91a..acf1b64e4 100644 --- a/Zotlabs/Module/Dirsearch.php +++ b/Zotlabs/Module/Dirsearch.php @@ -229,7 +229,7 @@ class Dirsearch extends Controller { 'hash' => $rr['ud_hash'], 'address' => $rr['ud_addr'], 'host' => $rr['ud_host'], - 'transaction_id' => $rr['ud_host'], // deprecated 2023-04-12 + 'transaction_id' => $rr['ud_host'], // deprecated 2023-04-12 - can be removed after dir servers at version >= 8.4 'timestamp' => $rr['ud_date'], 'flags' => $rr['ud_flags'] ]; |