Open b-ma opened 1 year ago
Another option would be to use a collection, but where everyone is able to delete a state, not only the owner. Probably that's the most straightforward to implement:
server.stateManager.register('my-list', schema, { shareOwnership: true });
This does not work as expected as when an owner disconnects, all states owned by the node are deleted, which is good. But if everyone is owner, the states are deleted each time a single node disconnect, which is not what we want...
To Be Continued...
Should allow to maintain a collection of items (i.e.
add(item)
,delete(item)
) in a kind of "atomic" fashion.For now, if we do something like:
Multiple consecutive calls just can erase the modifications from each others. We could have something like:
Another option would be to use a collection, but where everyone is able to delete a state, not only the owner. Probably that's the most straightforward to implement: