From aa0412d83bd4ffb1e5208020ccae269e7cc13a3b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 6 Apr 2016 20:25:52 -0700 Subject: use the explicit form of build_sync_packet so that file/photo sync will work even when the actual observer is a guest (with permission to upload). --- Zotlabs/Storage/Directory.php | 6 ++++++ Zotlabs/Storage/File.php | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 0347ce087..95d7ebf46 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -335,6 +335,12 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota { $p = photo_upload($c[0],\App::get_observer(),$args); } + $sync = attach_export_data($c[0],$hash); + + if($sync) + build_sync_packet($c[0]['channel_id'],array('file' => array($sync))); + + } /** diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index a4bf3f49d..5c3dcd9c6 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -205,6 +205,12 @@ class File extends DAV\Node implements DAV\IFile { return; } } + + $sync = attach_export_data($c[0],$this->data['hash']); + + if($sync) + build_sync_packet($c[0]['channel_id'],array('file' => array($sync))); + } /** -- cgit v1.2.3