]> git.mxchange.org Git - friendica.git/commitdiff
Fix other calls to Mail::send to provide ID
authorHank Grabowski <hankgrabowski@gmail.com>
Wed, 22 Mar 2023 22:25:32 +0000 (18:25 -0400)
committerHank Grabowski <hankgrabowski@gmail.com>
Wed, 22 Mar 2023 22:25:32 +0000 (18:25 -0400)
mod/message.php

index 1e8c012eeb622b5f5dfa663a3f2b6da10d4c5829..99fb6b3b41cbc4e39787175edfd0921c2a8d8c95 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) {