     @cleanupCollaboration()
 
 
-  endCollaborationForParticipant: (callbacks) ->
+  endCollaborationForParticipant: (callback) ->
 
     @broadcastMessage { type: 'ParticipantWantsToLeave' }
 

      envHelpers.detachSocialChannel @workspaceData, (err) =>
        throwError err  if err

    callbacks.success()


  handleCollaborationEndedForHost: ->

    @chat.settingsPane.endSession.disable()

    if @amIHost
      @endCollaborationForHost =>
        @modal?.destroy()
        @handleCollaborationEndedForHost()
    else
      @endCollaborationForParticipant =>
        @modal?.destroy()
        @handleCollaborationEndedForParticipant()


  endCollaborationForHost: (callback) ->

    @broadcastMessage { type: 'SessionEnded' }

