 
   cleanupCollaboration: (options = {}) ->
 
-    return  unless @stateMachine.state is 'Ending'
+    # 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



  onRealtimeParticipantLeft: (data) ->

    {sessionId} = data.collaborator



    title = @getRealtimeFileName()
    realtimeHelpers.fetchCollaborationFile @rtm, title, (err, file) =>
      return callbacks.error err  if err
      realtimeHelpers.loadCollaborationFile @rtm, file.id, (err, doc) =>
        return callbacks.error err  if err
        @rtmFileId = file.id
        callbacks.success @socialChannel, doc

