matrix-js-sdk
matrix-js-sdk copied to clipboard
Optimise MatrixRTC sender key distribution for case of single member
Based on top of https://github.com/matrix-org/matrix-js-sdk/pull/4453.
Optimises two scenarios:
- user is only member of call, then one other member joins => the user can immediately rotate the key and start using it.
- there were two members in the call, then the other member left => the user can immediately rotate their key and start using it.
The "doesn't re-send key immediately" test is superseded by the other test cases.
Checklist
- [x] Tests written for new code (and old code if feasible).
- [x] New or updated
public
/exported
symbols have accurate TSDoc documentation. - [x] Linter and other CI checks pass.
- [x] Sign-off given on the changes (see CONTRIBUTING.md).