mirror of
https://github.com/atom/atom.git
synced 2026-02-02 10:45:14 -05:00
Store participants and repository under collaborationState doc
This commit is contained in:
committed by
Kevin Sawicki
parent
1836257f0b
commit
3ce520d9de
@@ -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)
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user