From 5773ba6e577f668d485838fc5a1d2270cc3eb006 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Wed, 13 Jan 2016 08:04:02 -0600 Subject: [PATCH] * autofollow behavior --- .../react-components/stores/SessionStore.js.coffee | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee index 7b48ed75f..77b414b34 100644 --- a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee +++ b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee @@ -58,12 +58,13 @@ ConfigureTracksActions = @ConfigureTracksActions onSessionJoinedByOther: (payload) -> clientId = payload.client_id - parentClientId = context.jamClient.getParentClientId() - if parentClientId? && parentClientId != '' - if parentClientId == clientId - # auto nav to session - logger.debug("autonav to session #{payload.session_id}") - context.SessionActions.navToSession(payload.session_id) + #parentClientId = context.jamClient.getParentClientId() + #if parentClientId? && parentClientId != '' + #if parentClientId == clientId + # auto nav to session + if context.jamClient.getClientParentChildRole && context.jamClient.getClientParentChildRole() == CLIENT_ROLE.CHILD && payload.source_user_id == context.JK.currentUserId + logger.debug("autonav to session #{payload.session_id}") + context.SessionActions.navToSession(payload.session_id) onNavToSession: (sessionId) -> context.location = '/client#/session/' + sessionId