summaryrefslogtreecommitdiff
path: root/actions/twitapidirect_messages.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/twitapidirect_messages.php')
-rw-r--r--actions/twitapidirect_messages.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/actions/twitapidirect_messages.php b/actions/twitapidirect_messages.php
index a0a09a410..3037890ad 100644
--- a/actions/twitapidirect_messages.php
+++ b/actions/twitapidirect_messages.php
@@ -113,9 +113,12 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
if (!$content) {
$this->client_error(_('No message text!'), $code = 406, $apidata['content-type']);
} else if (mb_strlen($status) > 140) {
- $this->client_error(_('That\'s too long. Max message size is 140 chars.'),
- $code = 406, $apidata['content-type']);
- return;
+ $status = common_shorten_links($status);
+ if (mb_strlen($status) > 140) {
+ $this->client_error(_('That\'s too long. Max message size is 140 chars.'),
+ $code = 406, $apidata['content-type']);
+ return;
+ }
}
$other = $this->get_user($this->trimmed('user'));