aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-01 22:59:06 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-01 22:59:06 -0700
commit9328edfdcdba589c69ce2b26f249458c57ef42d8 (patch)
tree16382637df01bf403e2fc2aad5163d28ddea1d56 /include
parentd105f324afefa138683094a05b056dd25122a76a (diff)
downloadvolse-hubzilla-9328edfdcdba589c69ce2b26f249458c57ef42d8.tar.gz
volse-hubzilla-9328edfdcdba589c69ce2b26f249458c57ef42d8.tar.bz2
volse-hubzilla-9328edfdcdba589c69ce2b26f249458c57ef42d8.zip
obscure mail subject in conversation structure
Diffstat (limited to 'include')
-rw-r--r--include/message.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/message.php b/include/message.php
index 5720d2da4..396e3162c 100644
--- a/include/message.php
+++ b/include/message.php
@@ -75,13 +75,16 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$handles = $recip_handle . ';' . $sender_handle;
+ if($subject)
+ $nsubject = str_rot47(base64url_encode($subject));
+
$r = q("insert into conv (uid,guid,creator,created,updated,subject,recips) values(%d, '%s', '%s', '%s', '%s', '%s', '%s') ",
intval(local_channel()),
dbesc($conv_guid),
dbesc($sender_handle),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
- dbesc($subject),
+ dbesc($nsubject),
dbesc($handles)
);
@@ -212,6 +215,12 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
intval($channel['channel_id']),
dbesc('<' . $channel['channel_hash'] . '>')
);
+ $r = q("UPDATE attach SET allow_cid = '%s' WHERE hash = '%s' AND is_photo = 1 and uid = %d and allow_cid = '%s'",
+ dbesc('<' . $recipient . '>'),
+ dbesc($image_uri),
+ intval($channel['channel_id']),
+ dbesc('<' . $channel['channel_hash'] . '>')
+ );
}
}