X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FMessage.php;h=484d1f724c09749637b802d3976e6a03f1a01e9b;hb=a76f0676317058a8c1e2fd14ac04c7cabcbed6a7;hp=353dc01f99e0b3cb6265d260213e8bed2285f0f7;hpb=b03ece26eb1589c5200094f4d87455ca46db780b;p=quix0rs-gnu-social.git diff --git a/classes/Message.php b/classes/Message.php index 353dc01f99..484d1f724c 100644 --- a/classes/Message.php +++ b/classes/Message.php @@ -45,12 +45,19 @@ 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); - $msg->rendered = common_render_text($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($msg->content); $msg->created = common_sql_now(); $msg->source = $source;