diff --git a/client/package.json b/client/package.json index 1e6fd915..4d2d4e5b 100644 --- a/client/package.json +++ b/client/package.json @@ -20,10 +20,10 @@ "gulp-gzip": "0.0.8" }, "dependencies": { - "lodash": "3.0.0", - "reflux": "0.2.4", - "react-router": "~0.11.6", - "react": "~0.12.2", - "react-infinite": "~0.2.2" + "lodash": "3.2.0", + "reflux": "0.2.5", + "react-router": "0.12.0", + "react": "0.12.2", + "react-infinite": "0.2.3" } -} +} \ No newline at end of file diff --git a/client/src/js/stores/selectedTab.js b/client/src/js/stores/selectedTab.js index a7333ddf..23908b19 100644 --- a/client/src/js/stores/selectedTab.js +++ b/client/src/js/stores/selectedTab.js @@ -18,6 +18,7 @@ var selectedTabStore = Reflux.createStore({ this.listenToMany(actions); this.listenTo(channelActions.part, 'part'); this.listenTo(serverActions.disconnect, 'disconnect'); + this.listenTo(channelActions.addUser, 'userAdded'); this.listenTo(channelActions.load, 'loadChannels'); this.listenTo(serverActions.load, 'loadServers'); }, @@ -51,6 +52,17 @@ var selectedTabStore = Reflux.createStore({ } }, + userAdded: function(user, server, channel) { + // Update the selected channel incase the casing is different + if (server === selectedTab.server && + channel.toLowerCase() === selectedTab.channel.toLowerCase() && + user === serverStore.getNick(server)) { + selectedTab.channel = channel; + selectedTab.name = channel; + this.trigger(selectedTab); + } + }, + loadChannels: function(channels) { if (selectedTab.channel && !_.find(channels, { name: selectedTab.channel })) { selectedTab.channel = null;