summaryrefslogtreecommitdiff
path: root/actions/twitapistatuses.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/twitapistatuses.php')
-rw-r--r--actions/twitapistatuses.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php
index 539a0b1b3..ca79feb4c 100644
--- a/actions/twitapistatuses.php
+++ b/actions/twitapistatuses.php
@@ -253,13 +253,19 @@ class TwitapistatusesAction extends TwitterapiAction {
return;
} else if (mb_strlen($status) > 140) {
+
+ $status = common_shorten_links($status);
- // XXX: Twitter truncates anything over 140, flags the status
- // as "truncated." Sending this error may screw up some clients
- // that assume Twitter will truncate for them. Should we just
- // truncate too? -- Zach
- $this->client_error(_('That\'s too long. Max notice size is 140 chars.'), $code = 406, $apidata['content-type']);
- return;
+ if (mb_strlen($status) > 140) {
+
+ // XXX: Twitter truncates anything over 140, flags the status
+ // as "truncated." Sending this error may screw up some clients
+ // that assume Twitter will truncate for them. Should we just
+ // truncate too? -- Zach
+ $this->client_error(_('That\'s too long. Max notice size is 140 chars.'), $code = 406, $apidata['content-type']);
+ return;
+
+ }
}
// Check for commands