aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php25
1 files changed, 7 insertions, 18 deletions
diff --git a/include/zot.php b/include/zot.php
index 437ec0c86..7369de80a 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -770,6 +770,8 @@ function zot_fetch($arr) {
function zot_import($arr) {
+// logger('zot_import: ' . print_r($arr,true), LOGGER_DATA);
+
$data = json_decode($arr['body'],true);
if(! $data) {
@@ -781,6 +783,8 @@ function zot_import($arr) {
$data = json_decode(aes_unencapsulate($data,get_config('system','prvkey')),true);
}
+ logger('zot_import: data' . print_r($data,true), LOGGER_DATA);
+
$incoming = $data['pickup'];
$return = array();
@@ -833,12 +837,10 @@ function zot_import($arr) {
if($i['message']) {
if($i['message']['type'] === 'activity') {
$arr = get_item_elements($i['message']);
-
if(! array_key_exists('created',$arr)) {
logger('Activity rejected: probable failure to lookup author/owner. ' . print_r($i['message'],true));
continue;
}
-
logger('Activity received: ' . print_r($arr,true), LOGGER_DATA);
logger('Activity recipients: ' . print_r($deliveries,true), LOGGER_DATA);
@@ -1020,18 +1022,6 @@ function process_delivery($sender,$arr,$deliveries,$relay) {
$perm = (($arr['mid'] == $arr['parent_mid']) ? 'send_stream' : 'post_comments');
- // This is our own post, possibly coming from a channel clone
-
- if($arr['owner_xchan'] == $d['hash']) {
- $arr['item_flags'] = $arr['item_flags'] | ITEM_WALL;
- }
- else {
- // clear the wall flag if it is set
- if($arr['item_flags'] & ITEM_WALL) {
- $arr['item_flags'] = ($arr['item_flags'] ^ ITEM_WALL);
- }
- }
-
if((! perm_is_allowed($channel['channel_id'],$sender['hash'],$perm)) && (! $tag_delivery)) {
logger("permission denied for delivery {$channel['channel_id']}");
$result[] = array($d['hash'],'permission denied',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
@@ -1575,7 +1565,7 @@ function build_sync_packet($uid = 0, $packet = null) {
// don't pass these elements, they should not be synchronised
- $disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey','channel_address');
+ $disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey');
if(in_array($k,$disallowed))
continue;
@@ -1615,8 +1605,7 @@ function build_sync_packet($uid = 0, $packet = null) {
function process_channel_sync_delivery($sender,$arr,$deliveries) {
-// FIXME - this will sync red structures (channel, pconfig and abook). Eventually we need to make this application agnostic.
-// TODO: missing group membership changes
+// FIXME - this will sync red structures. Eventually we need to make this application agnostic.
$result = array();
@@ -1646,7 +1635,7 @@ function process_channel_sync_delivery($sender,$arr,$deliveries) {
}
if(array_key_exists('channel',$arr) && is_array($arr['channel']) && count($arr['channel'])) {
- $disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey', 'channel_address');
+ $disallowed = array('channel_id','channel_account_id','channel_primary','channel_prvkey');
$clean = array();
foreach($arr['channel'] as $k => $v) {