           title    : 'LEAVE'
           callback : =>
             @modal.destroy()
+            kd.singletons.router.handleRoute '/IDE'  if redirect
 
     @showModal options
     @handleCollaborationEndedForParticipant()

    @showModal options


  showSessionEndedModal: (content) ->

    content ?= "This collaboration session has been terminated by the host @#{@collaborationHost}."


      kd.utils.killRepeat @pollInterval
      if @amIHost 
      then @stopCollaborationSession()
      else @showSessionEndedModal { redirect : yes }


  handleBroadcastMessage: (data) ->
