This commit is contained in:
barisusakli
2014-09-02 16:01:45 -04:00
parent e495db3065
commit 6b39e328f5
3 changed files with 3 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ define('forum/chats', ['string', 'sounds'], function(S, sounds) {
if (Chats.isCurrentChat(data.withUid)) {
newMessage = data.self === 0;
data.message.self = data.self;
Chats.parseMessage(data.message, function(html) {
var newMessage = $(html);
newMessage.insertBefore(typingNotifEl);

View File

@@ -63,6 +63,7 @@ define('chat', ['taskbar', 'string', 'sounds', 'forum/chats'], function(taskbar,
var username = data.message.fromUser.username;
var isSelf = parseInt(data.message.fromUser.uid, 10) === parseInt(app.uid, 10);
data.message.self = data.self;
if (isSelf) {
username = data.message.toUser.username;
}

View File

@@ -207,7 +207,7 @@ SocketModules.chats.send = function(socket, data, callback) {
server.getUserSockets(touid).forEach(function(s) {
s.emit('event:chats.receive', {
withUid: socket.uid,
message: recipMessage,
message: message,
self: 0
});
});