 
   ready: -> # have to override for collaborative workspace
 
-  showSessionModal: ->
+  amIHost: ->
+    [sessionOwner] = @sessionKey.split ":"
+    return sessionOwner == KD.nick()
+
   showNotActiveView: ->
     notValid = new KDView
       cssClass : "not-valid"


    @workspaceRef.on "child_added", (snapshot) =>
      log "everything is something happened", "child_added", snapshot.val(), snapshot.name()

    @on "NewPanelAdded", (panel) ->
      log "New panel created", panel


      keys = snapshot.val()?.keys

      @workspaceRef.onDisconnect().remove()  if @amIHost()

      if keys # if we have keys this means we're about to join an old session
        log "it's an old session, impressed!"
        @sessionData  = keys
