* feat: Only share history if room history visibility is shared
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
* docs: Update documentation for `InviteOpts.shareEncryptedHistory`
* tests: Ensure shared history respects current history visibility
This commit additionally modifies `expectSendRoomEvent` to remove
the matcher on success, since fetchmock takes a while to do this
automatically.
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
---------
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
* Store rooms pending key bundles in the CryptoStore
Replace the in-memory storage of which rooms are waiting for a key bundle with
permanent storage in the crypto store.
* Clear pending-key-bundle flag on malformed bundles
If we cannot import the key bundle, there is no point trying again another
time: we may as well clear the flag either way.
* Factor out some helpers in history sharing integ test
* Do not accept key bundles for rooms we joined more than 24h ago
Per discussion in crypto-internal.
* Clear pending key bundle data when we leave a room
* Resume key-bundle import on restart
* Clear pending-key-bundle flag on rooms that we joined ages ago
* fixup! Clear pending-key-bundle flag on malformed bundles
There is no need for this method to be exposed to the application, and it's a
footgun waiting to trap the unwary user.
It's marked `@experimental` so we're allowed to move it without a major version
bump.
* Update dependency @matrix-org/matrix-sdk-crypto-wasm to v18
* Adapt to breaking changes in rust-sdk wasm bindings
* more types fixes
* types fixes for tests
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <richard@matrix.org>
* Add zizmor CI & make it happy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix additional zizmor warning
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update release workflows to deal with monorepos
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Do the same for release-gitflow.yml
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* cleanup: Remove deprecated rtc room key transport
* fix: rtc statistics are managed by transport directly
* mark as readonly
* cleanup do not use deprecated `room`
* doc: Add missing param doc
* fixup: add back test wrongly removed
When multiple m.replace edits arrive concurrently, getLastReplacement()
may block on decryption. If an older edit's decryption completes after a
newer edit has already been applied, the older async result overwrites
the target event with stale content.
Add a monotonic update counter (replacementUpdateId) and centralise all
replacement updates through updateTargetEventReplacement(). The method
captures the counter before awaiting and discards the result if a newer
update has started in the meantime.
This race is especially pronounced in encrypted rooms with rapid
streaming-style edits, where variable decryption timing causes
out-of-order promise resolution.
* Fix reactive display name disambiguation
When a room member changes their display name, recalculate the disambiguation flag for all other members who share (or previously shared) that display name. This ensures that the 'disambiguate' flag is updated reactively when display name conflicts appear or are resolved.
Fixeselement-hq/element-web#468Fixeselement-hq/element-web#4795Fixeselement-hq/element-web#31551
Signed-off-by: aditya-cherukuru <cherukuru.aditya01@gmail.com>
* Refactor: move disambiguation logic per review feedback
- Added updateDisambiguation() method to RoomMember for direct disambiguation recalculation
- Moved affected display name tracking to setStateEvents() instead of updateDisplayNameCache()
- Removed setMembershipEvent() hack, now calls updateDisambiguation() directly
Signed-off-by: aditya-cherukuru <cherukuru.aditya01@gmail.com>
* Exclude processed members from disambiguation loop
Signed-off-by: aditya-cherukuru <cherukuru.aditya01@gmail.com>
---------
Signed-off-by: aditya-cherukuru <cherukuru.aditya01@gmail.com>
Just noticed these requests aren't logged,
which makes debugging difficult.
This is very drive-by, done in the web editor.
Co-authored-by: R Midhun Suresh <hi@midhun.dev>