]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/newmessage.php
message input form correctly shows and check max length
[quix0rs-gnu-social.git] / actions / newmessage.php
index 52d4899ba2d453d8012465eaa60def69458df4a2..cd26e1640b5b5f64219fd4af82146ad29e06bfbf 100644 (file)
@@ -144,9 +144,10 @@ class NewmessageAction extends Action
         } else {
             $content_shortened = common_shorten_links($this->content);
 
-            if (mb_strlen($content_shortened) > 140) {
-                $this->showForm(_('That\'s too long. ' .
-                    'Max message size is 140 chars.'));
+            if (Message::contentTooLong($content_shortened)) {
+                $this->showForm(sprintf(_('That\'s too long. ' .
+                                          'Max message size is %d chars.'),
+                                        Message::maxContent()));
                 return;
             }
         }