|
|
|
@ -10,9 +10,7 @@ var db = require('./database'),
|
|
|
|
|
(function(Messaging) {
|
|
|
|
|
|
|
|
|
|
function sortUids(fromuid, touid) {
|
|
|
|
|
var uids = [fromuid, touid];
|
|
|
|
|
uids.sort();
|
|
|
|
|
return uids;
|
|
|
|
|
return [fromuid, touid].sort();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Messaging.addMessage = function(fromuid, touid, content, callback) {
|
|
|
|
@ -126,12 +124,12 @@ var db = require('./database'),
|
|
|
|
|
|
|
|
|
|
user.getMultipleUserFields(uids, ['username', 'picture', 'uid'], function(err, users) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return callback(err)
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
users = users.filter(function(user) {
|
|
|
|
|
return !!user.uid;
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
callback(null, users);
|
|
|
|
|
});
|
|
|
|
|