diff options
Diffstat (limited to 'classes/Message.php')
-rw-r--r-- | classes/Message.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/Message.php b/classes/Message.php index 353dc01f9..c4508187b 100644 --- a/classes/Message.php +++ b/classes/Message.php @@ -45,11 +45,18 @@ class Message extends Memcached_DataObject throw new ClientException(_('You are banned from sending direct messages.')); } + $user = User::staticGet('id', $sender->id); + $msg = new Message(); $msg->from_profile = $from; $msg->to_profile = $to; - $msg->content = common_shorten_links($content); + if ($user) { + // Use the sender's URL shortening options. + $msg->content = $user->shortenLinks($content); + } else { + $msg->content = common_shorten_links($content); + } $msg->rendered = common_render_text($content); $msg->created = common_sql_now(); $msg->source = $source; |