summaryrefslogtreecommitdiffstats
path: root/webapp/components/logged_in.jsx
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-02-24 17:34:21 +0000
committerGitHub <noreply@github.com>2017-02-24 17:34:21 +0000
commit97cc0a0d73dcacfefcdff785c802762e2a0a60d6 (patch)
treec584bb28511980bde3bf09a6fffc1f8feacf9ddf /webapp/components/logged_in.jsx
parentf182d196fffc9da89ad63bdbd7bbb2e41da3146e (diff)
downloadchat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.tar.gz
chat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.tar.bz2
chat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.zip
PLT-5071: Client side component of Telemetry. (#5516)
Diffstat (limited to 'webapp/components/logged_in.jsx')
-rw-r--r--webapp/components/logged_in.jsx16
1 files changed, 1 insertions, 15 deletions
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx
index 9282e74ca..8d7a00653 100644
--- a/webapp/components/logged_in.jsx
+++ b/webapp/components/logged_in.jsx
@@ -26,7 +26,6 @@ export default class LoggedIn extends React.Component {
super(params);
this.onUserChanged = this.onUserChanged.bind(this);
- this.setupUser = this.setupUser.bind(this);
// Because current CSS requires the root tag to have specific stuff
$('#root').attr('class', 'channel-view');
@@ -45,9 +44,7 @@ export default class LoggedIn extends React.Component {
user: UserStore.getCurrentUser()
};
- if (this.state.user) {
- this.setupUser(this.state.user);
- } else {
+ if (!this.state.user) {
GlobalActions.emitUserLoggedOutEvent('/login');
}
}
@@ -56,21 +53,10 @@ export default class LoggedIn extends React.Component {
return this.state.user != null;
}
- setupUser(user) {
- // Update segment indentify
- if (global.window.mm_config.SegmentDeveloperKey != null && global.window.mm_config.SegmentDeveloperKey !== '') {
- global.window.analytics.identify(user.id, {
- createdAt: user.create_at,
- id: user.id
- });
- }
- }
-
onUserChanged() {
// Grab the current user
const user = UserStore.getCurrentUser();
if (!Utils.areObjectsEqual(this.state.user, user)) {
- this.setupUser(user);
this.setState({
user
});