]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
to parameter is an ID not a nickname
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 17 Sep 2008 18:51:42 +0000 (14:51 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 17 Sep 2008 18:51:42 +0000 (14:51 -0400)
darcs-hash:20080917185142-5ed1f-1f87afb283161609bfc202824a39c53f3239b716.gz

actions/newmessage.php

index 95b98ec4798b1eb21ccb159e68489c8a751f2327..7df6c7259137a5516f6eb156e58bf2204b9081fc 100644 (file)
@@ -37,6 +37,7 @@ class NewmessageAction extends Action {
 
                $user = common_current_user();
                assert($user); # XXX: maybe an error instead...
+               
                $content = $this->trimmed('content');
                $to = $this->trimmed('to');
                
@@ -124,7 +125,7 @@ class NewmessageAction extends Action {
 
                $to = common_canonical_nickname($this->trimmed('to'));
                
-               $other = User::staticGet('nickname', $to);
+               $other = User::staticGet('id', $to);
 
                if (!$other) {
                        $this->client_error(_('No such user'), 404);