aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-23 04:34:35 -0700
committerfriendica <info@friendica.com>2014-09-23 04:34:35 -0700
commitad86cc24c843ee577df508ba4d03c34788bec991 (patch)
treec2439f57c2fa8601e18bd58232b50ac0a29b978a /include/diaspora.php
parent509a85cb12636dc01b59935febf9419cfb02fd48 (diff)
downloadvolse-hubzilla-ad86cc24c843ee577df508ba4d03c34788bec991.tar.gz
volse-hubzilla-ad86cc24c843ee577df508ba4d03c34788bec991.tar.bz2
volse-hubzilla-ad86cc24c843ee577df508ba4d03c34788bec991.zip
d* PM cont.
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 74dad177a..c71d04fbe 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -2668,7 +2668,7 @@ function diaspora_send_mail($item,$owner,$contact) {
$r = q("select * from conv where id = %d and uid = %d limit 1",
intval($item['convid']),
- intval($item['uid'])
+ intval($item['channel_id'])
);
if(! count($r)) {
@@ -2685,6 +2685,15 @@ function diaspora_send_mail($item,$owner,$contact) {
'participant_handles' => xmlify($cnv['recips'])
);
+ if(array_key_exists('mail_flags',$item) && ($item['mail_flags'] & MAIL_OBSCURED)) {
+ $key = get_config('system','prvkey');
+// if($item['title'])
+// $item['title'] = crypto_unencapsulate(json_decode_plus($item['title']),$key);
+ if($item['body'])
+ $item['body'] = crypto_unencapsulate(json_decode_plus($item['body']),$key);
+ }
+
+
$body = bb2diaspora($item['body']);
$created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C');