-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wip: e2ee #17
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 3047582861Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@YousefED Have you looked into how this the matrix-files-sdk handles crypto? Very easy to follow code. It might help to take a look at it. https://github.com/vector-im/files-sdk-demo/blob/7b47ef65c5e9bb60f976c9b96a60b0f666f1d4ba/src/MatrixCrypto.ts |
I think that you can just mention like in a jsdoc for an |
Could we use 'snapshots' to solve this? When a latecomer joins, generate a new snapshot of the current state of the ydoc, which the newcomer can use to load theirs? |
I would also suggest upgrading the version you are using of the |
This PR adds support for private rooms and end to end encryption (e2ee).
In this PR, we move from a per-room polling based approach, to using the
sync
API. We are now callingstartClient
which causesmatrix-js-sdk
to call the Matrixsync
API and keeps all rooms in sync. This is necessary becausematrix-js-sdk
takes care of crypto events and key sharing, so we can easily send / receive encrypted messages by reusing the SDK.(Before, we pretty much only used the
matrix-js-sdk
as a wrapper to the Matrix HS APIs, not to keep track of any state like rooms, keys, etc.)This move has a few downsides (which is why we initially went for the per-room polling approach):
Migrating to
startClient
brings a few extra todos:matrixRoomListener
instead (we now use both methods at the same time)MatrixMemberReader
as we can now usemaySendEvent
ofmatrix-js-sdk
Other open todos
getMatrixRoomSecurity
andupdateMatrixRoomAccess
for private roomsmatrix-js-sdk
that supports all UI flows required (cross signing / backups / key management) is quite cumbersome. This should be made easier before we can expect people to actually start using this