aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-05 17:11:38 -0800
committerfriendica <info@friendica.com>2012-12-05 17:11:38 -0800
commit270266357d76392660703d290ab159774cfc2081 (patch)
treec04344b4f21133d40ff9b8970a7091a0dcfcb302
parent1c6f301d8faf2e6a5939e47c7a83655615bfc762 (diff)
downloadvolse-hubzilla-270266357d76392660703d290ab159774cfc2081.tar.gz
volse-hubzilla-270266357d76392660703d290ab159774cfc2081.tar.bz2
volse-hubzilla-270266357d76392660703d290ab159774cfc2081.zip
make mail replies work
-rwxr-xr-xinclude/items.php7
-rw-r--r--mod/message.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 76e378d79..7e38469e8 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1629,7 +1629,12 @@ function mail_store($arr) {
$arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : '');
$arr['mail_flags'] = ((x($arr,'mail_flags')) ? intval($arr['mail_flags']) : 0 );
-
+
+ if(! $arr['parent_uri']) {
+ logger('mail_store: missing parent');
+ $arr['parent_uri'] = $arr['uri'];
+ }
+
$r = q("SELECT `id` FROM mail WHERE `uri` = '%s' AND channel_id = %d LIMIT 1",
dbesc($arr['uri']),
intval($arr['channel_id'])
diff --git a/mod/message.php b/mod/message.php
index 34aee10a8..9e8a54fed 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -437,7 +437,7 @@ logger('message: ' . print_r($message,true));
logger('mails: ' . print_r($mails,true));
- $recp = (($message['from_xchan'] === $channel['channel_hash']) ? 'to_xchan' : 'from_xchan');
+ $recp = (($message['from_xchan'] === $channel['channel_hash']) ? 'to' : 'from');
$select = $message[$recp]['xchan_name'] . '<input type="hidden" name="messageto" value="' . $message[$recp]['xchan_hash'] . '" />';
$parent = '<input type="hidden" name="replyto" value="' . $message['parent_uri'] . '" />';