Created
July 31, 2013 00:19
-
-
Save admc/6118262 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var syncArr = []; | |
messages.forEach(function(message) { | |
var f = function(cb) { | |
message.getUser(function(err, user) { | |
message.username = user.username; | |
cb(null, user); | |
}) | |
}; | |
syncArr.push(f) | |
}); | |
async.series(syncArr, function(err, results) { | |
params.messages = messages; | |
self.respond(params); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment