diff options
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-x | include/diaspora.php | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 26f0dc70f..43eed003e 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -329,7 +329,7 @@ function find_diaspora_person_by_handle($handle) { if(! $person) { // try webfinger. Make sure to distinguish between diaspora, - // redmatrix w/diaspora protocol and friendica w/diaspora protocol. + // hubzilla w/diaspora protocol and friendica w/diaspora protocol. $result = discover_by_webbie($handle); if($result) { @@ -706,8 +706,8 @@ function diaspora_request($importer,$xml) { $cnv = random_string(); $mid = random_string(); - $msg = t('You have started sharing with a Redmatrix premium channel.'); - $msg .= t('Redmatrix premium channels are not available for sharing with Diaspora members. This sharing request has been blocked.') . "\r"; + $msg = t('You have started sharing with a Hubzilla premium channel.'); + $msg .= t('Hubzilla premium channels are not available for sharing with Diaspora members. This sharing request has been blocked.') . "\r"; $msg .= t('Please do not reply to this message, as this channel is not sharing with you and any reply will not be seen by the recipient.') . "\r"; $created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C'); @@ -1521,7 +1521,7 @@ function diaspora_comment($importer,$xml,$msg) { $key = get_config('system','pubkey'); $x = array('signer' => $diaspora_handle, 'body' => $text, 'signed_text' => $signed_data, 'signature' => base64_encode($author_signature)); - $datarray['diaspora_meta'] = json_encode(crypto_encapsulate(json_encode($x),$key)); + $datarray['diaspora_meta'] = json_encode($x); } @@ -2135,7 +2135,7 @@ function diaspora_like($importer,$xml,$msg) { $key = get_config('system','pubkey'); $x = array('signer' => $diaspora_handle, 'body' => $text, 'signed_text' => $signed_data, 'signature' => base64_encode($author_signature)); - $arr['diaspora_meta'] = json_encode(crypto_encapsulate(json_encode($x),$key)); + $arr['diaspora_meta'] = json_encode($x); } $x = item_store($arr); @@ -2418,6 +2418,20 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) { } */ + if($item['item_flags'] & ITEM_CONSENSUS) { + $poll = replace_macros(get_markup_template('diaspora_consensus.tpl'), array( + '$guid_q' => random_string(), + '$question' => t('Please choose'), + '$guid_y' => random_string(), + '$agree' => t('Agree'), + '$guid_n' => random_string(), + '$disagree' => t('Disagree'), + '$guid_a' => random_string(), + '$abstain' => t('Abstain') + )); + } + else + $poll = ''; $public = (($item['item_private']) ? 'false' : 'true'); @@ -2435,17 +2449,18 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) { '$handle' => xmlify($myaddr), '$public' => $public, '$created' => $created, - '$provider' => (($item['app']) ? $item['app'] : 'redmatrix') + '$provider' => (($item['app']) ? $item['app'] : 'hubzilla') )); } else { $tpl = get_markup_template('diaspora_post.tpl'); $msg = replace_macros($tpl, array( '$body' => xmlify($body), '$guid' => $item['mid'], + '$poll' => $poll, '$handle' => xmlify($myaddr), '$public' => $public, '$created' => $created, - '$provider' => (($item['app']) ? $item['app'] : 'redmatrix') + '$provider' => (($item['app']) ? $item['app'] : 'hubzilla') )); } |