matrix-org / matrix-org/matrix-js-sdk
Does EncryptionSetupBuilder make sense without cryptoCallbacks?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.2k
- Forks
- 704
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 40
Description
https://github.com/matrix-org/matrix-js-sdk/blob/a69d9a9f20b680e3710e0f43cca68a2ce31ba030/src/client.ts#L315
`cryptoCallbacks` may be undefined but the constructor of `EncryptionSetupBuilder` requires it to be defined.
If the classes `EncryptionSetupBuilder` and `SSSSCryptoCallbacks` don't make sense without the callbacks, we should create these conditionally:
https://github.com/matrix-org/matrix-js-sdk/blob/a69d9a9f20b680e3710e0f43cca68a2ce31ba030/src/crypto/index.ts#L616-L620
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/client.ts around line 315 to trace how EncryptionSetupBuilder is constructed when cryptoCallbacks is undefined, then compare the related setup in src/crypto/index.ts around lines 616-620. Determine whether EncryptionSetupBuilder and SSSSCryptoCallbacks should exist without callbacks, and make the construction behavior consistent for both defined and undefined callback cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100