]> git.mxchange.org Git - friendica.git/commitdiff
Issue 1769: Some enhancements for sending wall mails
authorMichael Vogel <icarus@dabo.de>
Sun, 29 May 2016 17:35:23 +0000 (19:35 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 29 May 2016 17:35:23 +0000 (19:35 +0200)
mod/message.php
mod/wallmessage.php

index 8108ff96bdc6dde958f04c4f7524c7c19d4e3267..2d194ed244618e29df2534d6490f8f3e6beda526 100644 (file)
@@ -446,9 +446,11 @@ function message_content(&$a) {
                        if($message['from-url'] == $myprofile) {
                                $from_url = $myprofile;
                                $sparkle = '';
-                       }
-                       else {
-                               $from_url = 'redir/' . $message['contact-id'];
+                       } elseif ($message['contact-id'] != 0) {
+                               $from_url = 'redir/'.$message['contact-id'];
+                               $sparkle = ' sparkle';
+                       } else {
+                               $from_url = $message['from-url']."?zrl=".urlencode($myprofile);
                                $sparkle = ' sparkle';
                        }
 
@@ -462,8 +464,7 @@ function message_content(&$a) {
                                $subject_e = template_escape($message['title']);
                                $body_e = template_escape(Smilies::replace(bbcode($message['body'])));
                                $to_name_e = template_escape($message['name']);
-                       }
-                       else {
+                       } else {
                                $from_name_e = $message['from-name'];
                                $subject_e = $message['title'];
                                $body_e = Smilies::replace(bbcode($message['body']));
index b8859badd3d30504f6ea7c57f914e3a9be31ad5d..8642624a476e4b75c3c0f7dbb99cf5ba0e5ebbab 100644 (file)
@@ -48,7 +48,7 @@ function wallmessage_post(&$a) {
        $body = str_replace("\r\n","\n",$body);
        $body = str_replace("\n\n","\n",$body);
 
-       
+
        $ret = send_wallmessage($user, $body, $subject, $replyto);
 
        switch($ret){
@@ -68,8 +68,8 @@ function wallmessage_post(&$a) {
                        info( t('Message sent.') . EOL );
        }
 
-//     goaway($a->get_baseurl() . '/profile/' . $user['nickname']);
-       
+       goaway('profile/'.$user['nickname']);
+
 }