Permalink
Browse files

Merge pull request #193 from SpenserJ/query_duplication_fix

Workaround for Queries duplicating and sent replies disappearing.
  • Loading branch information...
2 parents 5bfefdc + b9eabfe commit 38923d864642ef491298b69567e826241d2b0147 @thedjpetersen committed Dec 24, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 assets/js/client.js
View
@@ -184,12 +184,12 @@ $(function() {
});
irc.socket.on('pm', function(data) {
- var chatWindow = irc.chatWindows.getByName(data.nick);
+ var chatWindow = irc.chatWindows.getByName(data.nick.toLowerCase());
if (typeof chatWindow === 'undefined') {
- irc.chatWindows.add({name: data.nick, type: 'pm'})
+ irc.chatWindows.add({name: data.nick.toLowerCase(), type: 'pm'})
.trigger('forMe', 'newPm');
- irc.socket.emit('getOldMessages',{channelName: data.nick, skip:0, amount: 50});
- chatWindow = irc.chatWindows.getByName(data.nick);
+ irc.socket.emit('getOldMessages',{channelName: data.nick.toLowerCase(), skip:0, amount: 50});
+ chatWindow = irc.chatWindows.getByName(data.nick.toLowerCase());
}
chatWindow.stream.add({sender: data.nick, raw: data.text, type: 'pm'});
});

0 comments on commit 38923d8

Please sign in to comment.