From 55d905fdd934090ce4c6511a3db035e073cd1fcb Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 3 Oct 2021 16:53:48 +0000 Subject: clone channel delete issues - part 2 --- Zotlabs/Lib/Libsync.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Zotlabs/Lib/Libsync.php') diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index 67603a0e3..9118813a7 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -704,6 +704,15 @@ class Libsync { $ret = []; + // If a sender reports that the channel has been deleted, delete its hubloc + if (isset($arr['deleted_locally']) && intval($arr['deleted_locally'])) { + q("UPDATE hubloc SET hubloc_deleted = 1, hubloc_updated = '%s' WHERE hubloc_hash = '%s' AND hubloc_url = '%s'", + dbesc(datetime_convert()), + dbesc($sender['hash']), + dbesc($sender['site']['url']) + ); + } + if ($arr['locations']) { if ($absolute) @@ -861,6 +870,7 @@ class Libsync { $what .= 'delete_hub '; $changed = true; } + continue; } -- cgit v1.2.3