obscure mail subject in conversation structure

This commit is contained in:
redmatrix 2015-09-01 22:59:06 -07:00
parent d105f324af
commit 9328edfdcd

View file

@ -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'] . '>')
);
}
}