summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index fa6302b6d..6ad606e5e 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -157,9 +157,12 @@ module.exports = React.createClass({
onSocketChange: function(msg) {
if (msg.action === 'posted') {
if (ChannelStore.getCurrentId() === msg.channel_id) {
- if (window.isActive) AsyncClient.updateLastViewedAt();
+ if (window.isActive) {
+ AsyncClient.updateLastViewedAt();
+ }
} else {
- AsyncClient.getChannel(msg.channel_id);
+ console.log('hit');
+ AsyncClient.getChannels();
}
if (UserStore.getCurrentId() !== msg.user_id) {
@@ -213,7 +216,7 @@ module.exports = React.createClass({
utils.ding();
}
}
- } else if (msg.action === "viewed") {
+ } else if (msg.action === 'viewed') {
if (ChannelStore.getCurrentId() !== msg.channel_id && UserStore.getCurrentId() === msg.user_id) {
AsyncClient.getChannel(msg.channel_id);
}