Store participants and repository under collaborationState doc

This commit is contained in:
Corey Johnson & Kevin Sawicki
2013-07-10 10:14:31 -07:00
committed by Kevin Sawicki
parent 1836257f0b
commit 3ce520d9de
2 changed files with 8 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ class GuestSession
console.log 'received document'
doc = telepath.Document.deserialize(data, site: telepath.createSite(@getId()))
atom.windowState = doc.get('windowState')
@participants = doc.get('participants')
@participants = doc.get('collaborationState.participants')
@participants.on 'changed', =>
@trigger 'participants-changed', @participants.toObject()
connectDocument(doc, connection)

View File

@@ -17,8 +17,13 @@ class HostSession
@peer = createPeer()
@doc = telepath.Document.create({}, site: telepath.createSite(@getId()))
@doc.set('windowState', atom.windowState)
@doc.set('participants', [])
@participants = @doc.get('participants')
@doc.set 'collaborationState',
participants: []
repository:
url: git.getConfigValue('remote.origin.url')
branch: git.getShortHead()
@participants = @doc.get('collaborationState.participants')
@participants.push
id: @getId()
email: git.getConfigValue('user.email')