diff options
author | Mario <mario@mariovavti.com> | 2019-06-15 23:07:39 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-06-15 23:07:39 +0200 |
commit | 3bc214e5449c7ce190a35ae6e70a1fb7ebe84962 (patch) | |
tree | 2687f7ec477ab98c2488d430ffcf79731a85e198 /Zotlabs/Module | |
parent | a26774b99e1cf3e69df4f527e2c4c4443dce63ad (diff) | |
parent | 43cec4398d0d035dd9446988134b814513a73080 (diff) | |
download | volse-hubzilla-3bc214e5449c7ce190a35ae6e70a1fb7ebe84962.tar.gz volse-hubzilla-3bc214e5449c7ce190a35ae6e70a1fb7ebe84962.tar.bz2 volse-hubzilla-3bc214e5449c7ce190a35ae6e70a1fb7ebe84962.zip |
Merge branch 'dev' into 'dev'
Add signatures processing for private messages
See merge request hubzilla/core!1670
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Mail.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php index 3202d38a5..7c344966b 100644 --- a/Zotlabs/Module/Mail.php +++ b/Zotlabs/Module/Mail.php @@ -25,6 +25,10 @@ class Mail extends \Zotlabs\Web\Controller { $expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : NULL_DATE); $raw = ((x($_REQUEST,'raw')) ? intval($_REQUEST['raw']) : 0); $mimetype = ((x($_REQUEST,'mimetype')) ? notags(trim($_REQUEST['mimetype'])) : 'text/bbcode'); + + $sig = ((x($_REQUEST,'signature')) ? trim($_REQUEST['signature']) : ''); + if(strpos($sig,'b64.') === 0) + $sig = base64_decode(str_replace('b64.', '', $sig)); if($preview) { @@ -123,7 +127,7 @@ class Mail extends \Zotlabs\Web\Controller { // We have a local_channel, let send_message use the session channel and save a lookup - $ret = send_message(0, $recipient, $body, $subject, $replyto, $expires, $mimetype, $raw); + $ret = send_message(0, $recipient, $body, $subject, $replyto, $expires, $mimetype, $raw, $sig); if($ret['success']) { xchan_mail_query($ret['mail']); @@ -396,8 +400,9 @@ class Mail extends \Zotlabs\Web\Controller { 'can_recall' => ($channel['channel_hash'] == $message['from_xchan']), 'is_recalled' => (intval($message['mail_recalled']) ? t('Message has been recalled.') : ''), 'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'], 'c'), + 'sig' => base64_encode($message['sig']) ); - + $seen = $message['seen']; } |