merge async_client getMe changes

Этот коммит содержится в:
JoramWilander
2015-08-14 12:39:38 -04:00
родитель 3faa09c641
Коммит a7f09be978

Просмотреть файл

@@ -390,15 +390,15 @@ module.exports.getPosts = function(force, id, maxPosts) {
} }
} }
function getMeSynchronous() { function getMe() {
if (isCallInProgress('getMeSynchronous')) { if (isCallInProgress('getMe')) {
return; return;
} }
callTracker.getMeSynchronous = utils.getTimestamp(); callTracker.getMe = utils.getTimestamp();
client.getMeSynchronous( client.getMeSynchronous(
function(data, textStatus, xhr) { function(data, textStatus, xhr) {
callTracker.getMeSynchronous = 0; callTracker.getMe = 0;
if (xhr.status === 304 || !data) return; if (xhr.status === 304 || !data) return;
@@ -409,11 +409,11 @@ function getMeSynchronous() {
}, },
function(err) { function(err) {
callTracker.getMe = 0; callTracker.getMe = 0;
dispatchError(err, 'getMeSynchronous'); dispatchError(err, 'getMe');
} }
); );
} }
module.exports.getMeSynchronous = getMeSynchronous; module.exports.getMe = getMe;
module.exports.getStatuses = function() { module.exports.getStatuses = function() {
if (isCallInProgress('getStatuses')) return; if (isCallInProgress('getStatuses')) return;