]> git.mxchange.org Git - friendica.git/blobdiff - mod/message.php
Wrap HTTP client call in try catch in Network\Probe
[friendica.git] / mod / message.php
index 1e8c012eeb622b5f5dfa663a3f2b6da10d4c5829..928f575ef38b0bfe729d146e1e1bb7d6b2bab71e 100644 (file)
@@ -69,12 +69,13 @@ function message_post(App $a)
                return;
        }
 
+       $sender_id = DI::userSession()->getLocalUserId();
        $replyto   = !empty($_REQUEST['replyto'])   ? trim($_REQUEST['replyto'])                   : '';
        $subject   = !empty($_REQUEST['subject'])   ? trim($_REQUEST['subject'])                   : '';
        $body      = !empty($_REQUEST['body'])      ? Strings::escapeHtml(trim($_REQUEST['body'])) : '';
        $recipient = !empty($_REQUEST['recipient']) ? intval($_REQUEST['recipient'])               : 0;
 
-       $ret = Mail::send($recipient, $body, $subject, $replyto);
+       $ret = Mail::send($sender_id, $recipient, $body, $subject, $replyto);
        $norecip = false;
 
        switch ($ret) {
@@ -435,7 +436,7 @@ function render_messages(array $msg, string $t): string
                $to_name_e = $rr['name'];
 
                if (is_null($rr['url'])) {
-                       // contact-id is pointing to a non existing contact
+                       // contact-id is pointing to a nonexistent contact
                        continue;
                }