X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcommand.php;h=bc0dd894de6d7f396dac1d17eb7d7786ca2459b0;hb=34b570352f9a21ddbc7a0d0925828f29a38d8d04;hp=d15fe43ce17f2356ce18027024112202dab0a3ad;hpb=7d191f8062e5d117ac234737bc7ab838859dc4d6;p=quix0rs-gnu-social.git diff --git a/lib/command.php b/lib/command.php index d15fe43ce1..bc0dd894de 100644 --- a/lib/command.php +++ b/lib/command.php @@ -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;