to parameter is an ID not a nickname

darcs-hash:20080917185142-5ed1f-1f87afb283161609bfc202824a39c53f3239b716.gz
This commit is contained in:
Evan Prodromou 2008-09-17 14:51:42 -04:00
parent e42de1ccc1
commit f65039212d
1 changed files with 2 additions and 1 deletions

View 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);