diff options
Diffstat (limited to 'actions/newmessage.php')
-rw-r--r-- | actions/newmessage.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/actions/newmessage.php b/actions/newmessage.php index 7dce97d20..2455f42e9 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -53,10 +53,15 @@ class NewmessageAction extends Action { $this->show_form(_('No content!')); return; } else if (mb_strlen($content) > 140) { - common_debug("Content = '$content'", __FILE__); - common_debug("mb_strlen(\$content) = " . mb_strlen($content), __FILE__); - $this->show_form(_('That\'s too long. Max message size is 140 chars.')); - return; + + $content = common_shorten_links($content); + + if (mb_strlen($content) > 140) { + common_debug("Content = '$content'", __FILE__); + common_debug("mb_strlen(\$content) = " . mb_strlen($content), __FILE__); + $this->show_form(_('That\'s too long. Max message size is 140 chars.')); + return; + } } $other = User::staticGet('id', $to); |