aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php
index 4cc22ac12..fecaa7ad2 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -801,7 +801,7 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
);
}
} else {
- $photos = import_profile_photo($arr['photo'], $xchan_hash);
+ $photos = import_xchan_photo($arr['photo'], $xchan_hash);
}
if ($photos) {
if ($photos[4]) {
@@ -1637,10 +1637,9 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
}
}
-
- $ab = q("select abook.* from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d
- and abook_self = 0",
- intval($channel['channel_id'])
+ $ab = q("select * from abook where abook_channel = %d and abook_xchan = '%s'",
+ intval($channel['channel_id']),
+ dbesc($arr['owner_xchan'])
);
$abook = (($ab) ? $ab[0] : null);
@@ -2842,6 +2841,8 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
*/
function process_channel_sync_delivery($sender, $arr, $deliveries) {
+ require_once('include/import.php');
+
/** @FIXME this will sync red structures (channel, pconfig and abook). Eventually we need to make this application agnostic. */
$result = array();
@@ -2874,6 +2875,12 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
}
}
+ if(array_key_exists('obj',$arr) && $arr['obj'])
+ sync_objs($channel,$arr['obj']);
+
+ if(array_key_exists('app',$arr) && $arr['app'])
+ sync_apps($channel,$arr['app']);
+
if(array_key_exists('channel',$arr) && is_array($arr['channel']) && count($arr['channel'])) {
if(array_key_exists('channel_page_flags',$arr['channel']) && intval($arr['channel']['channel_pageflags'])) {
$arr['channel']['channel_removed'] = (($arr['channel']['channel_pageflags'] & 0x8000) ? 1 : 0);