         @chat.emit 'CollaborationEnded'
         @chat = null
         @modal.destroy()
+        @rtm = null
         KD.singletons.mainView.activitySidebar.emit 'ReloadMessagesRequested'
 
       @rtm.deleteFile @getRealTimeFileName()


  isRealtimeSessionActive: (id, callback) ->

    @rtm.once 'FileQueryFinished', (file) =>

      if file.result.items.length > 0
        callback yes, file
      else
        callback no

    @rtm.fetchFileByTitle @getRealTimeFileName id


  setSocialChannel: (channel) ->

          callback : => @modal.destroy()

    @showModal options
    @rtm = null


  showSessionEndedModal: ->
