]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Command.php
better header for not-modified message
[quix0rs-gnu-social.git] / classes / Command.php
index 0795f86afbc12d6f16f75abddd1c609a8b4d8885..c2409d140a2ac152c86ca780ffe36d288833bf42 100644 (file)
@@ -197,9 +197,14 @@ class MessageCommand extends Command {
                        $channel->error($this->user, _('No content!'));
                        return;
                } else if ($len > 140) {
-                       $channel->error($this->user, sprintf(_('Message too long - maximum is 140 characters, you sent %d'), $len));
-                       return;
-               } else if (!$other) {
+                       $content = common_shorten_links($content);
+                       if (mb_strlen($content) > 140) {
+                               $channel->error($this->user, sprintf(_('Message too long - maximum is 140 characters, you sent %d'), $len));
+                               return;
+                       }
+               }
+               
+               if (!$other) {
                        $channel->error($this->user, _('No such user.'));
                        return;
                } else if (!$this->user->mutuallySubscribed($other)) {