aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-29 18:42:05 -0700
committerfriendica <info@friendica.com>2015-03-29 18:42:05 -0700
commitc29d3fc08ae4b5df72c3958ac790a56815413051 (patch)
tree3ffd4501e9d386774d200105f73ed84829ec14dc /include/diaspora.php
parentf01757f0c26a9fed2a307c71dc1a6a41d4b17e3e (diff)
downloadvolse-hubzilla-c29d3fc08ae4b5df72c3958ac790a56815413051.tar.gz
volse-hubzilla-c29d3fc08ae4b5df72c3958ac790a56815413051.tar.bz2
volse-hubzilla-c29d3fc08ae4b5df72c3958ac790a56815413051.zip
mod_connections ajax failure see http://stackoverflow.com/questions/14347611/jquery-client-side-template-syntax-error-unrecognized-expression
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 405fa1e40..75eac7681 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -698,6 +698,57 @@ function diaspora_request($importer,$xml) {
return;
}
+
+//FIXME
+/*
+ if(feature_enabled($channel['channel_id'],'premium_channel')) {
+ $myaddr = $importer['channel_address'] . '@' . get_app()->get_hostname();
+ $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('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');
+ $signed_text = $mid . ';' . $cnv . ';' . $msg . ';'
+ . $created . ';' . $myaddr . ';' . $cnv;
+
+ $sig = base64_encode(rsa_sign($signed_text,$importer['channel_prvkey'],'sha256'));
+
+ $conv = array(
+ 'guid' => xmlify($cnv),
+ 'subject' => xmlify(t('Sharing request failed.')),
+ 'created_at' => xmlify($created),
+ 'diaspora_handle' => xmlify($myaddr),
+ 'participant_handles' => xmlify($myaddr . ';' . $sender_handle)
+ );
+
+ $msg = array(
+ 'guid' => xmlify($mid),
+ 'parent_guid' => xmlify($cnv),
+ 'parent_author_signature' => xmlify($sig),
+ 'author_signature' => xmlify($sig),
+ 'text' => xmlify($msg),
+ 'created_at' => xmlify($created),
+ 'diaspora_handle' => xmlify($myaddr),
+ 'conversation_guid' => xmlify($cnv)
+ );
+
+ $conv['messages'] = array($msg);
+ $tpl = get_markup_template('diaspora_conversation.tpl');
+ $xmsg = replace_macros($tpl, array('$conv' => $conv));
+
+ $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($xmsg,$importer,$ret,$importer['channel_prvkey'],$ret['xchan_pubkey'],false)));
+
+ diaspora_transmit($importer,$ret,$slap,false);
+ return;
+ }
+
+*/
+// End FIXME
+
+
$role = get_pconfig($channel['channel_id'],'system','permissions_role');
if($role) {
$x = get_role_perms($role);