]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Message.php
Add urlshortenerplugin2.php to solve some @todo's and adding exceptions
[quix0rs-gnu-social.git] / classes / Message.php
index bc25b1b0b3acfd15e0727e3e6ebe6594e4b12777..2f5938adcb21b3fc77bd3f82fdb57237a0aea7da 100644 (file)
@@ -81,12 +81,14 @@ class Message extends Managed_DataObject
 
         $msg->from_profile = $from;
         $msg->to_profile = $to;
-        if ($user) {
+
+        if ($user instanceof 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;
@@ -184,7 +186,7 @@ class Message extends Managed_DataObject
             }
             
             $act->actor            = $profile->asActivityObject();
-            $act->actor->extra[]   = $profile->profileInfo(null);
+            $act->actor->extra[]   = $profile->profileInfo();
 
             $act->verb = ActivityVerb::POST;