aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-05 19:23:21 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-05 19:23:21 -0700
commitf559c91b7a7ff3e3e3bfd1ce430ce5b5615c07ea (patch)
tree45586e86825e60ac68ef0e26d1f1ee8b562feeaf /include
parente4fe068ed51c3d92cdb416492c3cc0ad26c28c1c (diff)
downloadvolse-hubzilla-f559c91b7a7ff3e3e3bfd1ce430ce5b5615c07ea.tar.gz
volse-hubzilla-f559c91b7a7ff3e3e3bfd1ce430ce5b5615c07ea.tar.bz2
volse-hubzilla-f559c91b7a7ff3e3e3bfd1ce430ce5b5615c07ea.zip
turn consensus items into diaspora polls for that network
Diffstat (limited to 'include')
-rwxr-xr-xinclude/diaspora.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 75eac7681..4aa525838 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -2427,6 +2427,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' => '',
+ '$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');
@@ -2451,6 +2465,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
$msg = replace_macros($tpl, array(
'$body' => xmlify($body),
'$guid' => $item['mid'],
+ '$poll' => $poll,
'$handle' => xmlify($myaddr),
'$public' => $public,
'$created' => $created,