aboutsummaryrefslogtreecommitdiffstats
path: root/include/message.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-12-06 00:16:13 -0800
committerfriendica <info@friendica.com>2011-12-06 00:16:13 -0800
commitbe8e9d36160d8a45bb11c3ab9ecdbf0c4f5cdf7d (patch)
tree9bad78a28b7c7fc77b25741018d4fda5f11eb9d3 /include/message.php
parent47f369e052d296f4a744c1508efc58f6168b7e8b (diff)
downloadvolse-hubzilla-be8e9d36160d8a45bb11c3ab9ecdbf0c4f5cdf7d.tar.gz
volse-hubzilla-be8e9d36160d8a45bb11c3ab9ecdbf0c4f5cdf7d.tar.bz2
volse-hubzilla-be8e9d36160d8a45bb11c3ab9ecdbf0c4f5cdf7d.zip
d* pm
Diffstat (limited to 'include/message.php')
-rw-r--r--include/message.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/message.php b/include/message.php
index baf1bb2d5..58789d688 100644
--- a/include/message.php
+++ b/include/message.php
@@ -58,11 +58,16 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
$handles = $recip_handle . ';' . $sender_handle;
- $r = q("insert into conv (uid,guid,recips) values (%d, '%s', '%s') ",
+ $r = q("insert into conv (uid,guid,creator,created,updated,subject,recips) values(%d, '%s', '%s', '%s', '%s', '%s', '%s') ",
intval(local_user()),
dbesc($conv_guid),
+ dbesc($sender_handle),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc($subject),
dbesc($handles)
);
+
$r = q("select * from conv where guid = '%s' and uid = %d limit 1",
dbesc($conv_guid),
intval(local_user())
@@ -76,10 +81,11 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
return -4;
}
- $r = q("INSERT INTO `mail` ( `uid`, `convid`, `from-name`, `from-photo`, `from-url`,
+ $r = q("INSERT INTO `mail` ( `uid`, `guid`, `convid`, `from-name`, `from-photo`, `from-url`,
`contact-id`, `title`, `body`, `seen`, `replied`, `uri`, `parent-uri`, `created`)
- VALUES ( %d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, '%s', '%s', '%s' )",
+ VALUES ( %d, '%s', %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, '%s', '%s', '%s' )",
intval(local_user()),
+ dbesc(get_guid()),
intval($convid),
dbesc($me[0]['name']),
dbesc($me[0]['thumb']),