Skip to content

Commit 89b3d5e

Browse files
committed
invitations are done by upstream handler
1 parent 8fa755d commit 89b3d5e

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/renderer/replication/Replication.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,6 @@ const Replication = () => {
116116
const roles = projectDescription.layers.map(l => ({ type: 'put', key: ID.roleId(l.id), value: l.role }))
117117
await store.import(roles, { creatorId: CREATOR_ID })
118118

119-
/*
120-
On startup we import all invitations we already know about.
121-
18apr23: We need to check if this is still required because we may
122-
receive the invitations via the upstream handler.
123-
*/
124-
const allInvitations = await store.keys(ID.INVITED)
125-
const invitations = projectDescription.invitations
126-
.filter(invitation => (!allInvitations.includes(ID.makeId(ID.INVITED, invitation.id))))
127-
.map(invitation => ([{ type: 'put', key: ID.makeId(ID.INVITED, invitation.id), value: { name: invitation.name, description: invitation.topic } }]))
128-
.flat()
129-
await store.import(invitations, { creatorId: CREATOR_ID })
130-
131119
/*
132120
Handler toolbar commands for for sharing and joining layers
133121
*/

src/renderer/replication/handler/toolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default ({ store, replicatedProject, CREATOR_ID }) => {
4646
await store.import(replicatedKeys.map(key => ({ type: 'del', key })))
4747

4848
/* since the layer is not shared anymore this bacth does not trigger replication */
49-
const layerKeys = await store.collectKeys([id], [ID.LINK, ID.HIDDEN, ID.TAGS, ID.FEATURE, ID.STYLE])
49+
const layerKeys = await store.collectKeys([id], [ID.LINK, ID.HIDDEN, ID.TAGS, ID.FEATURE, ID.STYLE, ID.DEFAULT])
5050
await store.import(layerKeys.map(key => ({ type: 'del', key })))
5151

5252
const candidate = { type: 'put', key: ID.makeId(ID.INVITED, reJoinOffer.id), value: { name: reJoinOffer.name, description: reJoinOffer.topic } }

0 commit comments

Comments
 (0)