From bdef71bda0cbd148e57181275339ae88df9c12fe Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 27 Apr 2016 21:26:52 -0700 Subject: provide courtesy function for syncing one item. We'll probably be doing this a lot. --- include/items.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 7947f64a2..2720dd841 100755 --- a/include/items.php +++ b/include/items.php @@ -5616,3 +5616,18 @@ function send_profile_photo_activity($channel,$photo,$profile) { } + +function sync_an_item($channel_id,$item_id) { + + $r = q("select * from item where id = %d", + intval($item_id) + ); + if($r) { + xchan_query($r); + $sync_item = fetch_post_tags($r); + $rid = q("select * from item_id where iid = %d", + intval($item_id) + ); + build_sync_packet($channel_d,array('item' => array(encode_item($sync_item[0],true)),'item_id' => $rid)); + } +} \ No newline at end of file -- cgit v1.2.3