fixes chat messages

v1.18.x
barisusakli 11 years ago
parent a6c84ac1a8
commit f9572cc5c7

@ -77,8 +77,9 @@ var db = require('./database'),
} }
async.map(messages, function(message, next) { async.map(messages, function(message, next) {
message.fromUser = userData[0]; var self = parseInt(message.fromuid, 10) === parseInt(fromuid)
message.toUser = userData[1]; message.fromUser = self ? userData[0] : userData[1];
message.toUser = self ? userData[1] : userData[0];
Messaging.parse(message.content, message.fromuid, fromuid, userData[1], userData[0], isNew, function(result) { Messaging.parse(message.content, message.fromuid, fromuid, userData[1], userData[0], isNew, function(result) {
message.content = result; message.content = result;

Loading…
Cancel
Save