1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Implement stream

This commit is contained in:
mcrakhman 2025-02-11 17:49:08 +01:00
parent 687a97ee32
commit 1e374945e1
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
2 changed files with 10 additions and 2 deletions

View file

@ -196,6 +196,10 @@ func (st *AclState) Invites() []crypto.PubKey {
return invites
}
func (st *AclState) Key() crypto.PrivKey {
return st.key
}
func (st *AclState) InviteIds() []string {
var invites []string
for invId := range st.inviteKeys {

View file

@ -66,8 +66,9 @@ type SpaceService interface {
}
type Deps struct {
SyncStatus syncstatus.StatusUpdater
TreeSyncer treesyncer.TreeSyncer
SyncStatus syncstatus.StatusUpdater
TreeSyncer treesyncer.TreeSyncer
AccountService accountservice.Service
}
type spaceService struct {
@ -176,6 +177,9 @@ func (s *spaceService) NewSpace(ctx context.Context, id string, deps Deps) (Spac
return nil, err
}
spaceApp := s.app.ChildApp()
if deps.AccountService != nil {
spaceApp.Register(deps.AccountService)
}
spaceApp.Register(state).
Register(deps.SyncStatus).
Register(peerManager).