X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FMail.php;h=75515c5df53c8166e5d0240ea570a4120f6525cf;hb=235eab0d99891eb1d0bf401856dfb162c6f1ea20;hp=9c3bd58bb66d64d37b3875491db4b0924b26d178;hpb=c18cbe95a63338fd2fdb117901b365af95ab0401;p=friendica.git diff --git a/src/Model/Mail.php b/src/Model/Mail.php index 9c3bd58bb6..75515c5df5 100644 --- a/src/Model/Mail.php +++ b/src/Model/Mail.php @@ -74,9 +74,7 @@ class Mail return false; } - if ($msg['reply']) { - $reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]); - + if ($msg['reply'] && DBA::isResult($reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]))) { $msg['thr-parent'] = $reply['uri']; $msg['thr-parent-id'] = $reply['uri-id']; } else { @@ -173,7 +171,7 @@ class Mail $recip_host = substr($recip_host, 0, strpos($recip_host, '/')); $recip_handle = (($contact['addr']) ? $contact['addr'] : $contact['nick'] . '@' . $recip_host); - $sender_handle = $a->user['nickname'] . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3); + $sender_handle = $a->getLoggedInUserNickname() . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3); $conv_guid = System::createUUID(); $convuri = $recip_handle . ':' . $conv_guid; @@ -197,7 +195,7 @@ class Mail $replyto = $convuri; } - $post_id =self::insert( + $post_id = self::insert( [ 'uid' => local_user(), 'guid' => $guid,