api posts cannot use one of the reserved sources: web, omb, mail or xmpp.
darcs-hash:20081210173726-099f7-5fc908c7330ec8b21d101c1498d5b78ab09ee490.gz
This commit is contained in:
parent
a143b64666
commit
9553072e49
|
@ -104,7 +104,8 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
|
|||
$user = $apidata['user'];
|
||||
$source = $this->trimmed('source'); // Not supported by Twitter.
|
||||
|
||||
if (!$source) {
|
||||
$reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api');
|
||||
if (!$source || in_array($source, $reserved_sources)) {
|
||||
$source = 'api';
|
||||
}
|
||||
|
||||
|
|
|
@ -239,8 +239,8 @@ class TwitapistatusesAction extends TwitterapiAction {
|
|||
$status = $this->trimmed('status');
|
||||
$source = $this->trimmed('source');
|
||||
$in_reply_to_status_id = intval($this->trimmed('in_reply_to_status_id'));
|
||||
|
||||
if (!$source) {
|
||||
$reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api');
|
||||
if (!$source || in_array($source, $reserved_sources)) {
|
||||
$source = 'api';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user