 
 
   onRealtimeParticipantLeft: (data) ->
+
+    return  unless @stateMachine.state is 'Active'
 
     {sessionId} = data.collaborator
 


  onRealtimeParticipantJoined: (data) ->

    {sessionId} = data.collaborator

    {targetUser} =


  cleanupCollaboration: (options = {}) ->

    # TODO: remove Active session from here,
    # we will deffo need a leaving state.
    return  unless @stateMachine.state in ['Ending', 'Active']

    @rtm.once 'RealtimeManagerWillDispose', =>
      kd.utils.killRepeat @pingInterval
