|
|
@ -142,6 +142,9 @@ var db = require('./database'),
|
|
|
|
async.waterfall([
|
|
|
|
async.waterfall([
|
|
|
|
async.apply(db.getObjects, keys),
|
|
|
|
async.apply(db.getObjects, keys),
|
|
|
|
function(messages, next) {
|
|
|
|
function(messages, next) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
messages = messages.filter(Boolean);
|
|
|
|
|
|
|
|
|
|
|
|
async.map(messages, function(message, next) {
|
|
|
|
async.map(messages, function(message, next) {
|
|
|
|
var self = parseInt(message.fromuid, 10) === parseInt(fromuid, 10);
|
|
|
|
var self = parseInt(message.fromuid, 10) === parseInt(fromuid, 10);
|
|
|
|
message.fromUser = self ? userData[0] : userData[1];
|
|
|
|
message.fromUser = self ? userData[0] : userData[1];
|
|
|
|