aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-07 20:28:02 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-07 20:28:02 -0700
commitc39e3613a8facf0ef626fbd671f21f822ff25096 (patch)
treee39477b1a0d08e8631515bb4a973d3ccf151fc98 /include
parent5751437c93d43c07726cf122c87a39ac522032c6 (diff)
downloadvolse-hubzilla-c39e3613a8facf0ef626fbd671f21f822ff25096.tar.gz
volse-hubzilla-c39e3613a8facf0ef626fbd671f21f822ff25096.tar.bz2
volse-hubzilla-c39e3613a8facf0ef626fbd671f21f822ff25096.zip
create event sync packets
Diffstat (limited to 'include')
-rw-r--r--include/event.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/event.php b/include/event.php
index 134c23aa2..3b48837f1 100644
--- a/include/event.php
+++ b/include/event.php
@@ -376,6 +376,20 @@ function event_addtocal($item_id, $uid) {
intval($channel['channel_id'])
);
+ $item['resource_id'] = $event['event_hash'];
+ $item['resource_type'] = 'event';
+
+ $i = array($item);
+ xchan_query($i);
+ $sync_item = fetch_post_tags($i);
+ $z = q("select * from event where event_hash = '%s' and uid = %d limit 1",
+ dbesc($event['event_hash']),
+ intval($channel['channel_id'])
+ );
+ if($z) {
+ build_sync_packet($channel['channel_id'],array('event_item' => array(encode_item($sync_item[0],true)),'event' => $z));
+ }
+
return true;
}
}