marathon bugfixing with @barisusakli re: #1788

This commit is contained in:
Julian Lam
2014-07-07 19:47:03 -04:00
parent d9cdd2f165
commit 71916f0691
6 changed files with 25 additions and 18 deletions

View File

@@ -182,10 +182,13 @@ SocketModules.chats.send = function(socket, data, callback) {
sendChatNotification(socket.uid, touid, message.fromUser.username, message);
// After-the-fact fixing of the "self" property for the message that goes to the receipient
var recipMessage = JSON.parse(JSON.stringify(message));
recipMessage.self = 0;
server.getUserSockets(touid).forEach(function(s) {
s.emit('event:chats.receive', {
withUid: socket.uid,
message: message
message: recipMessage
});
});