     @peer.id
 
   isSharing: ->
-    @sharing
+    @peer? and not _.isEmpty(@peer.connections)

  peer: null
  mediaConnection: null
  doc: null
  sharing: false

  constructor: ->
    @doc = site.createDocument


      @peer.on 'connection', (connection) =>
        connection.on 'open', =>
          connection.send({repoSnapshot, doc: @doc.serialize()})
          sessionUtils.connectDocument(@doc, connection)
          @trigger 'started'

        connection.on 'close', =>
          @participants.each (participant, index) =>
            if connection.peer is participant.get('id')
              @participants.remove(index)
