From 44000b58d911af980a604ca977898760b4a35861 Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Thu, 9 Jul 2015 12:05:04 -0700
Subject: Server now notifies users they have been added to a new channel

---
 web/react/components/sidebar.jsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'web/react/components/sidebar.jsx')

diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 0e4d38fe0..8b1a25dc9 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -263,6 +263,9 @@ var SidebarLoggedIn = React.createClass({
             if (ChannelStore.getCurrentId() != msg.channel_id) {
                 AsyncClient.getChannels(true);
             }
+        } else if (msg.action == "user_added") {
+            if (UserStore.getCurrentId() === msg.user_id)
+                AsyncClient.getChannels(true);
         }
     },
     updateTitle: function() {
-- 
cgit v1.2.3-1-g7c22


From b1e2eccaf2b73194776c4c74a33e24022e6dd1e8 Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Thu, 9 Jul 2015 12:17:16 -0700
Subject: Added curly brace

---
 web/react/components/sidebar.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'web/react/components/sidebar.jsx')

diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 8b1a25dc9..2095978e8 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -264,8 +264,9 @@ var SidebarLoggedIn = React.createClass({
                 AsyncClient.getChannels(true);
             }
         } else if (msg.action == "user_added") {
-            if (UserStore.getCurrentId() === msg.user_id)
+            if (UserStore.getCurrentId() === msg.user_id) {
                 AsyncClient.getChannels(true);
+            }
         }
     },
     updateTitle: function() {
-- 
cgit v1.2.3-1-g7c22

