           callback : => @modal.destroy()
 
     @showModal options
+    @rtm = null
 
 
   showSessionEndedModal: ->

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

      @rtm.deleteFile @getRealTimeFileName()


  isRealtimeSessionActive: (id, callback) ->

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

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

      @rtm.fetchFileByTitle @getRealTimeFileName id

    if @rtm then kallback()
    else
      @rtm = new RealTimeManager
      @rtm.ready => kallback()


  setSocialChannel: (channel) ->
