X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmailhandler.php;h=459657ffe0d3f01bec851789e017bc532a63eebc;hb=bb087a965009fd93a5c02a9e10ab90adcc6b7963;hp=890f6d5b49fea9decfaf8476b0c3dbe5e28cb70c;hpb=b6aa1511eb868d740f8893160ce8bef387725867;p=quix0rs-gnu-social.git diff --git a/lib/mailhandler.php b/lib/mailhandler.php index 890f6d5b49..459657ffe0 100644 --- a/lib/mailhandler.php +++ b/lib/mailhandler.php @@ -55,10 +55,11 @@ class MailHandler return true; } $msg = $this->cleanup_msg($msg); - $msg = common_shorten_links($msg); + $msg = $user->shortenLinks($msg); if (Notice::contentTooLong($msg)) { - $this->error($from, sprintf(_('That\'s too long. '. - 'Max notice size is %d chars.'), + $this->error($from, sprintf(_('That\'s too long. Maximum notice size is %d character.', + 'That\'s too long. Maximum notice size is %d characters.', + Notice::maxContent()), Notice::maxContent())); } @@ -265,6 +266,10 @@ class MailHandler if (preg_match('/^\s*Begin\s+forward/', $line)) { break; } + // skip everything after a blank line if we already have content + if ($output !== '' && $line === '') { + break; + } $output .= ' ' . $line; }