$this->other = User::staticGet('id', $this->to);
if (!$this->other) {
- $this->clientError(_('No such user'), 404);
+ $this->clientError(_('No such user.'), 404);
return false;
}
return;
}
- $this->notify($user, $this->other, $message);
+ $message->notify();
if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8');
$this->elementEnd('head');
$this->elementStart('body');
$this->element('p', array('id' => 'command_result'),
- sprintf(_('Direct message to %s sent'),
+ sprintf(_('Direct message to %s sent.'),
$this->other->nickname));
$this->elementEnd('body');
$this->elementEnd('html');
$this->msg = $msg;
if ($this->trimmed('ajax')) {
- $this->startHTML('text/xml;charset=UTF-8');
+ header('Content-Type: text/xml;charset=utf-8');
+ $this->xw->startDocument('1.0', 'UTF-8');
+ $this->elementStart('html');
$this->elementStart('head');
$this->element('title', null, _('New message'));
$this->elementEnd('head');
$this->elementStart('body');
- if (common_logged_in()) {
- $this->showNoticeForm();
- }
- $this->elementEnd('div');
+ $this->showNoticeForm();
$this->elementEnd('body');
$this->endHTML();
}
}
}
- function notify($from, $to, $message)
- {
- mail_notify_message($message, $from, $to);
- // XXX: Jabber, SMS notifications... probably queued
- }
-
// Do nothing (override)
function showNoticeForm()