diff options
author | mrjive <mrjive@mrjive.it> | 2016-01-11 11:37:43 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2016-01-11 11:37:43 +0100 |
commit | 3206a46a9297dcbdc56c25512767dfb5bf66837b (patch) | |
tree | 1c4d162035669b4b599c6fce63f87cfb6dc4dd87 /include/message.php | |
parent | 9cbbc92062f0e42e32881a972a234a6c25758c37 (diff) | |
parent | 42b35c5ac9939d3401874edf4528ae7c917f77f1 (diff) | |
download | volse-hubzilla-3206a46a9297dcbdc56c25512767dfb5bf66837b.tar.gz volse-hubzilla-3206a46a9297dcbdc56c25512767dfb5bf66837b.tar.bz2 volse-hubzilla-3206a46a9297dcbdc56c25512767dfb5bf66837b.zip |
Merge pull request #14 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include/message.php')
-rw-r--r-- | include/message.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/message.php b/include/message.php index 940fcc275..f24bb6e4b 100644 --- a/include/message.php +++ b/include/message.php @@ -11,6 +11,7 @@ require_once('include/attach.php'); function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='',$expires = ''){ $ret = array('success' => false); + $is_reply = false; $a = get_app(); $observer_hash = get_observer_hash(); @@ -51,6 +52,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' $conv_guid = ''; if(strlen($replyto)) { + $is_reply = true; $r = q("select conv_guid from mail where channel_id = %d and ( mid = '%s' or parent_mid = '%s' ) limit 1", intval(local_channel()), dbesc($replyto), @@ -187,8 +189,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' - $r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires ) - VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", + $r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires, mail_isreply ) + VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d )", intval($channel['channel_account_id']), dbesc($conv_guid), intval(1), @@ -201,7 +203,8 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' dbesc($mid), dbesc($replyto), dbesc(datetime_convert()), - dbescdate($expires) + dbescdate($expires), + intval($is_reply) ); // verify the save |