diff options
Diffstat (limited to 'classes/Command.php')
-rw-r--r-- | classes/Command.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/classes/Command.php b/classes/Command.php index 0795f86af..c2409d140 100644 --- a/classes/Command.php +++ b/classes/Command.php @@ -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)) { |