From 4b48ff28681da55e2b4448c5e3f84ab6fa562df5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 4 Oct 2021 20:32:19 +0200 Subject: also sync the undestroy action --- Zotlabs/Lib/Apps.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index c3557e94e..7cba90c0e 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -742,13 +742,13 @@ class Apps { dbesc($app['guid']), intval($uid) ); - if($x) { - if($x[0]['app_system']) { - q("update app set app_deleted = 0 where app_id = '%s' and app_channel = %d", - dbesc($app['guid']), - intval($uid) - ); - } + if($x && intval($x[0]['app_deleted']) && $x[0]['app_system']) { + q("update app set app_deleted = 0 where app_id = '%s' and app_channel = %d", + dbesc($app['guid']), + intval($uid) + ); + $x[0]['app_deleted'] = 0; + Libsync::build_sync_packet($uid, ['sysapp' => $x]); } } } -- cgit v1.2.3