]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/command.php
Fix Direct Message functionality.
[quix0rs-gnu-social.git] / lib / command.php
index d15fe43ce17f2356ce18027024112202dab0a3ad..bc0dd894de6d7f396dac1d17eb7d7786ca2459b0 100644 (file)
@@ -586,7 +586,7 @@ class MessageCommand extends Command
     function handle($channel)
     {
         try {
-            $other = $this->getUser($this->other);
+            $other = $this->getUser($this->other)->getProfile();
         } catch (CommandException $e) {
             try {
                 $profile = $this->getProfile($this->other);
@@ -619,7 +619,7 @@ class MessageCommand extends Command
             return;
         }
 
-        if (!$other) {
+        if (!$other instanceof Profile) {
             // TRANS: Error text shown when trying to send a direct message to a user that does not exist.
             $channel->error($this->user, _('No such user.'));
             return;