From 92615247ac46e708de46651f21a4a179c38068c4 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 25 Feb 2017 15:04:17 -0800 Subject: send sync packet on profile photo permissions change --- Zotlabs/Module/Profile_photo.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 29a239f4d..438580917 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -183,6 +183,10 @@ class Profile_photo extends \Zotlabs\Web\Controller { photo_profile_setperms(local_channel(),$base_image['resource_id'],$_REQUEST['profile']); + $sync = attach_export_data($channel,$base_image['resource_id']); + if($sync) + build_sync_packet($channel['channel_id'],array('file' => array($sync))); + // Similarly, tell the nav bar to bypass the cache and update the avater image. $_SESSION['reload_avatar'] = true; @@ -341,6 +345,11 @@ class Profile_photo extends \Zotlabs\Web\Controller { photo_profile_setperms(local_channel(),$resource_id,$_REQUEST['profile']); + $sync = attach_export_data($channel,$resource_id); + if($sync) + build_sync_packet($channel['channel_id'],array('file' => array($sync))); + + \Zotlabs\Daemon\Master::Summon(array('Directory',local_channel())); goaway(z_root() . '/profiles'); } -- cgit v1.2.3