summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Command.php11
-rw-r--r--classes/User.php1
-rw-r--r--classes/laconica.ini1
3 files changed, 10 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)) {
diff --git a/classes/User.php b/classes/User.php
index 916524b8e..e3fa93395 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -55,6 +55,7 @@ class User extends Memcached_DataObject
public $smsemail; // varchar(255)
public $uri; // varchar(255) unique_key
public $autosubscribe; // tinyint(1)
+ public $urlshorteningservice; // varchar(50)
public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
diff --git a/classes/laconica.ini b/classes/laconica.ini
index 480b872d1..aa0225739 100644
--- a/classes/laconica.ini
+++ b/classes/laconica.ini
@@ -295,6 +295,7 @@ smsreplies = 17
smsemail = 2
uri = 2
autosubscribe = 17
+urlshorteningservice = 2
created = 142
modified = 384