try to sort out walltowall translation for diaspora recipients

This commit is contained in:
friendica 2014-09-19 02:22:24 -07:00
parent 083b5da967
commit 87a6f25769
7 changed files with 133 additions and 18 deletions

View File

@ -58,7 +58,7 @@ function diaspora_dispatch($importer,$msg,$attempt=1) {
$xmlbase = $parsed_xml->post;
logger('diaspora_dispatch: ' . print_r($xmlbase,true), LOGGER_DEBUG);
logger('diaspora_dispatch: ' . print_r($xmlbase,true), LOGGER_DATA);
if($xmlbase->request) {
@ -545,7 +545,7 @@ function diaspora_decode($importer,$xml) {
* </decrypted_header>
*/
logger('decrypted: ' . $decrypted, LOGGER_DEBUG);
logger('decrypted: ' . $decrypted, LOGGER_DATA);
$idom = parse_xml_string($decrypted,false);
$inner_iv = base64_decode($idom->iv);
@ -912,7 +912,7 @@ function diaspora_post($importer,$xml,$msg) {
function diaspora_reshare($importer,$xml,$msg) {
logger('diaspora_reshare: init: ' . print_r($xml,true));
logger('diaspora_reshare: init: ' . print_r($xml,true), LOGGER_DATA);
$a = get_app();
$guid = notags(unxmlify($xml->guid));
@ -955,7 +955,7 @@ function diaspora_reshare($importer,$xml,$msg) {
logger('diaspora_reshare: unable to fetch source url ' . $source_url);
return;
}
logger('diaspora_reshare: source: ' . $x['body']);
logger('diaspora_reshare: source: ' . $x['body'], LOGGER_DATA);
$source_xml = parse_xml_string($x['body'],false);

View File

@ -2469,19 +2469,11 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id)
return;
}
$body = $datarray['body'];
if(array_key_exists('item_flags',$datarray) && ($datarray['item_flags'] & ITEM_OBSCURED)) {
$key = get_config('system','prvkey');
if($datarray['body'])
$body = crypto_unencapsulate(json_decode($datarray['body'],true),$key);
}
require_once('include/bb2diaspora.php');
$signed_body = bb2diaspora_itembody($datarray);
logger('mod_item: storing diaspora comment signature',LOGGER_DEBUG);
require_once('include/bb2diaspora.php');
$signed_body = html_entity_decode(bb2diaspora($body));
$diaspora_handle = $channel['channel_address'] . '@' . get_app()->get_hostname();
$signed_text = $datarray['mid'] . ';' . $parent_item['mid'] . ';' . $signed_body . ';' . $diaspora_handle;

View File

@ -135,7 +135,7 @@ function onepoll_run($argv, $argc){
foreach($j['messages'] as $message) {
$results = process_delivery(array('hash' => $contact['xchan_hash']), get_item_elements($message),
array(array('hash' => $importer['xchan_hash'])), false);
logger('onepoll: feed_update: process_delivery: ' . print_r($results,true));
logger('onepoll: feed_update: process_delivery: ' . print_r($results,true), LOGGER_DATA);
$total ++;
}
logger("onepoll: $total messages processed");

View File

@ -854,7 +854,9 @@ function item_post(&$a) {
if($parent) {
// Store the comment signature information in case we need to relay to Diaspora
//FIXME
store_diaspora_comment_sig($datarray,$channel,$parent_item, $post_id);
$ditem = $datarray;
$ditem['author'] = $observer;
store_diaspora_comment_sig($ditem,$channel,$parent_item, $post_id);
}
update_remote_id($channel,$post_id,$webpage,$pagetitle,$namespace,$remote_id,$mid);

View File

@ -58,7 +58,7 @@ function receive_post(&$a) {
logger('mod-diaspora: decoded', LOGGER_DEBUG);
logger('mod-diaspora: decoded msg: ' . print_r($msg,true), LOGGER_DEBUG);
logger('mod-diaspora: decoded msg: ' . print_r($msg,true), LOGGER_DATA);
if(! is_array($msg))
http_status_exit(500);

View File

@ -1 +1 @@
2014-09-18.802
2014-09-19.803

View File

@ -38,3 +38,124 @@ h2 {
margin-bottom: 20px;
}
/**
* Stylish Select 0.4.9 - $ plugin to replace a select drop down box with a stylable unordered list
* http://github.com/scottdarby/Stylish-Select/
*
* Copyright (c) 2009 Scott Darby
*
* Requires: jQuery 1.3 or newer
*
* Dual licensed under the MIT and GPL licenses.
*/
/**
* Hide lists on page load
---------------------------------------------------------*/
#privacy-role-select .SSContainerDivWrapper {
left:-9999px;
}
/*
* Red example
---------------------------------------------------------*/
#privacy-role-select .SSContainerDivWrapper {
margin:0;
padding:0;
width:290px;
position:absolute;
top:22px;
left:0;
z-index:2;
}
#privacy-role-select ul.newList {
margin:0;
padding:0;
list-style:none;
color:#000;
background:#fff;
border:1px solid #ccc;
overflow:auto;
}
#privacy-role-select ul.newList * {
margin:0;
padding:0;
}
#privacy-role-select ul.newList a {
color: #000;
text-decoration:none;
display:block;
padding:3px 8px;
}
#privacy-role-select .newListSelected {
width:285px;
color:#000;
height:19px;
padding:3px 0 0 6px;
float:left;
background:url(select-bg.png) no-repeat;
}
#privacy-role-select ul.newList li a:focus {
-moz-outline-style: none;
}
#privacy-role-select .selectedTxt {
width:258px;
overflow:hidden;
height:16px;
padding:0 23px 0 0;
}
#privacy-role-select .hiLite {
background:#650101!important;
color:#fff!important;
}
#privacy-role-select .newListHover {
background:#ccc!important;
color:#000!important;
cursor:default;
}
#privacy-role-select .newListDisabled {
opacity: 0.6;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
filter: alpha(opacity=60);
}
#privacy-role-select .newListItemDisabled {
opacity: 0.6;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
filter: alpha(opacity=60);
}
#privacy-role-select .newListOptionDisabled {
opacity: 0.6;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
filter: alpha(opacity=60);
}
#privacy-role-select .newListSelHover,
#privacy-role-select .newListSelFocus {
background-position:0 -22px;
cursor:default;
}
#privacy-role-select .newListOptionTitle {
font-weight:bold;
}
#privacy-role-select .newListOptionTitle ul {
margin:3px 0 0;
}
#privacy-role-select .newListOptionTitle li {
font-weight:normal;
}