matrix-org / matrix-org/matrix-js-sdk

Does EncryptionSetupBuilder make sense without cryptoCallbacks?

Open
#1,863 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.