Alex Yang

Results 510 comments of Alex Yang

I think it's not the things that yjs should handle. Suppose you want to prohibit some user's modification on the doc. It would be best if you handled it manually...

> In my usecase the only server is a WebRTC signalling server so that permission checks has to occur on the clients. Of course you would check on each client...

I also implemented a socket.io provider last year. Hope you can get some inspiration. https://github.com/TexteaInc/y-socket.io/blob/main/src/server/socket/index.ts

Forget to say that Yjs already have such things called PermanentUserData https://github.com/yjs/yjs/blob/90f2a06b5e892ac08e989f5809e2e371ee101ec4/src/utils/PermanentUserData.js#L15 Maybe it would be useful in your user case. https://github.com/yjs/yjs-demos/blob/d8e33e619d6f2da0fae0c6a361286e6901635a9b/prosemirror-versions/prosemirror-versions.js#L143

similar https://issues.chromium.org/issues/40060207

Thanks for your contribution!

please try new alpha version

You will need to implement a Ydoc provider. For example, our sqlite provider https://github.com/toeverything/AFFiNE/blob/master/packages/workspace/src/providers/sqlite-providers.ts And there is a universal protocol. https://github.com/toeverything/blocksuite/blob/master/packages/store/src/providers/async-call-rpc.ts