more federation backend

This commit is contained in:
redmatrix 2016-03-16 21:05:52 -07:00
parent 38eb79705e
commit 3a8f6e6576
2 changed files with 4 additions and 7 deletions

View File

@ -3893,6 +3893,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
}
$datarray['parent_mid'] = $parent_mid;
$datarray['aid'] = $importer['channel_account_id'];
$datarray['uid'] = $importer['channel_id'];
logger('consume_feed: ' . print_r($datarray,true),LOGGER_DATA);
@ -3975,6 +3976,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
$datarray['parent_mid'] = $item_id;
$datarray['uid'] = $importer['channel_id'];
$datarray['aid'] = $importer['channel_account_id'];
if(! link_compare($author['owner_link'],$contact['xchan_url'])) {
logger('consume_feed: Correcting item owner.', LOGGER_DEBUG);
@ -4050,7 +4052,7 @@ function process_salmon_feed($xml, $importer) {
}
if($is_reply)
$ret['is_reply'] = true;
$ret['parent_mid'] = $parent_mid;
$ret['author'] = array();

View File

@ -42,13 +42,8 @@ function get_salmon_key($uri,$keyhash) {
if(count($ret)) {
for($x = 0; $x < count($ret); $x ++) {
if(substr($ret[$x],0,5) === 'data:') {
if(strstr($ret[$x],','))
$ret[$x] = substr($ret[$x],strpos($ret[$x],',')+1);
else
$ret[$x] = substr($ret[$x],5);
$ret[$x] = convert_salmon_key($ret[$x]);
}
else
$ret[$x] = fetch_url($ret[$x]);
}
}