class ApiDirectMessageNewAction extends ApiAuthAction
{
- var $source = null;
var $other = null;
var $content = null;
return;
}
- $this->source = $this->trimmed('source'); // Not supported by Twitter.
-
- $reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api');
- if (empty($this->source) || in_array($this->source, $reserved_sources)) {
- $source = 'api';
- }
-
$this->content = $this->trimmed('text');
$this->user = $this->auth_user;
$this->user = $this->auth_user;
- if ($this->user->id == $notice->profile_id) {
+ if ($this->user->id == $this->original->profile_id) {
$this->clientError(_('Cannot repeat your own notice.'),
400, $this->format);
return false;
var $lat = null;
var $lon = null;
- static $reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api');
-
/**
* Take arguments for running
*
parent::prepare($args);
$this->status = $this->trimmed('status');
- $this->source = $this->trimmed('source');
$this->lat = $this->trimmed('lat');
$this->lon = $this->trimmed('long');
- // try to set the source attr from OAuth app
- if (empty($this->source)) {
- $this->source = $this->oauth_source;
- }
-
- if (empty($this->source) || in_array($this->source, self::$reserved_sources)) {
- $this->source = 'api';
- }
-
$this->in_reply_to_status_id
= intval($this->trimmed('in_reply_to_status_id'));
var $count = null;
var $max_id = null;
var $since_id = null;
+ var $source = null;
var $access = self::READ_ONLY; // read (default) or read-write
+ static $reserved_sources = array('web', 'omb', 'ostatus', 'mail', 'xmpp', 'api');
+
/**
* Initialization.
*
header('X-StatusNet-Warning: since parameter is disabled; use since_id');
}
+ $this->source = $this->trimmed('source');
+
+ if (empty($this->source) || in_array($this->source, self::$reserved_sources)) {
+ $this->source = 'api';
+ }
+
return true;
}
{
var $auth_user_nickname = null;
var $auth_user_password = null;
- var $oauth_source = null;
/**
* Take arguments for running, looks for an OAuth request,
// set the source attr
- $this->oauth_source = $app->name;
+ $this->source = $app->name;
$appUser = Oauth_application_user::staticGet('token', $access_token);