aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-14 18:02:29 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-14 18:02:29 -0700
commita6cb90c81c29663e96d4fd96acd43fde1c28ac15 (patch)
tree24d116fb5fe6b1e2687f833cee9685d6480a95eb /include/diaspora.php
parentb467dc4f0055452b65fac842d1294ec9cc978445 (diff)
parent51b89f0ed8833004cf695de90791d8d0eec550b5 (diff)
downloadvolse-hubzilla-a6cb90c81c29663e96d4fd96acd43fde1c28ac15.tar.gz
volse-hubzilla-a6cb90c81c29663e96d4fd96acd43fde1c28ac15.tar.bz2
volse-hubzilla-a6cb90c81c29663e96d4fd96acd43fde1c28ac15.zip
Merge branch 'master' into tres
Conflicts: include/Import/refimport.php include/activities.php include/attach.php include/event.php include/externals.php include/identity.php include/items.php include/notifier.php include/photos.php include/taxonomy.php include/zot.php mod/channel.php mod/connedit.php mod/events.php mod/item.php mod/like.php mod/manage.php mod/mood.php mod/ping.php mod/poke.php mod/subthread.php mod/tagger.php mod/thing.php
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php29
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')
));
}