mirror of
https://github.com/friendica/friendica
synced 2024-12-22 14:38:02 +01:00
added replyto and subject to direct messages.
This commit is contained in:
parent
c14270ac64
commit
cd25c3b5dd
1 changed files with 19 additions and 8 deletions
|
@ -1514,13 +1514,24 @@
|
|||
intval(local_user()),
|
||||
dbesc($_POST['screen_name']));
|
||||
|
||||
$recipient = api_get_user($a, $r[0]['id']);
|
||||
|
||||
|
||||
require_once("include/message.php");
|
||||
$sub = ( (strlen($_POST['text'])>10)?substr($_POST['text'],0,10)."...":$_POST['text']);
|
||||
$id = send_message($recipient['id'], $_POST['text'], $sub);
|
||||
|
||||
$recipient = api_get_user($a, $r[0]['id']);
|
||||
$replyto = '';
|
||||
if (x($_REQUEST,'replyto')) {
|
||||
$r = q('SELECT `uri` FROM `mail` WHERE `uid`=%d AND `id`=%d',
|
||||
intval(local_user()),
|
||||
intval($_REQUEST['replyto']));
|
||||
$replyto = $r[0]['uri'];
|
||||
}
|
||||
|
||||
if (x($_REQUEST,'title')) {
|
||||
$sub = $_REQUEST['title'];
|
||||
}
|
||||
else {
|
||||
$sub = ((strlen($_POST['text'])>10)?substr($_POST['text'],0,10)."...":$_POST['text']);
|
||||
}
|
||||
$id = send_message($recipient['id'], $_POST['text'], $sub, $replyto);
|
||||
|
||||
if ($id>-1) {
|
||||
$r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));
|
||||
|
|
Loading…
Reference in a new issue