diff --git a/Code/Lib/Libsync.php b/Code/Lib/Libsync.php index 5277bc62a..d112f55b6 100644 --- a/Code/Lib/Libsync.php +++ b/Code/Lib/Libsync.php @@ -33,7 +33,7 @@ class Libsync public static function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) { - //logger('build_sync_packet'); + // logger('build_sync_packet'); $keychange = (($packet && array_key_exists('keychange', $packet)) ? true : false); if ($keychange) { diff --git a/Code/Module/Tasks.php b/Code/Module/Tasks.php index bd95c3cb6..3650f039c 100644 --- a/Code/Module/Tasks.php +++ b/Code/Module/Tasks.php @@ -4,6 +4,7 @@ namespace Code\Module; use App; use Code\Web\Controller; +use Code\Lib\Libsync; use Code\Lib\Apps; use Code\Widget\Tasklist; @@ -70,6 +71,7 @@ class Tasks extends Controller } $x = event_store_event($event); if ($x) { + Libsync::build_sync_packet($channel['channel_id'], ['event' => [$x]]); $ret['success'] = true; } } @@ -93,10 +95,13 @@ class Tasks extends Controller $event['summary'] = escape_tags($_REQUEST['summary']); $x = event_store_event($event); if ($x) { + Libsync::build_sync_packet($channel['channel_id'], ['event' => [$x]]); $x['success'] = true; - } else { + } + else { $x = ['success' => false]; } + json_return_and_die($x); } }