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>
We don't expect oidc-client-ts to provide the `device_authorization_endpoint` in the `OidcMetadata` because it isn't part of the OIDC spec.
As such, I think it makes sense to standardise on defining the metadata fields in `validate.ts` and clarify where they come from.
* Support additional_creators in upgradeRoom (MSC4289)
Signed-off-by: Andy Balaam <andy.balaam@matrix.org>
* Remove unneeded undefined in type definition
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Andy Balaam <andy.balaam@matrix.org>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Recalculate room name on loading members
Because if it's a DM room, loading members might change the room name
* Swap other userA / userB constants
* Typo
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Add support for stable OAuth2.0 aware feature from MSC3824
* Use stable name internally
* Mark DELEGATED_OIDC_COMPATIBILITY as
* Add tsdoc config for @alias JSDoc modifier
* Give RoomWidgetClient the ability to send and receive sticky events
* linter
* Fix existing tests
* Add tests for sticky event support in embedded clients
* Update sticky event widget capability identifiers
In matrix-widget-api 0.16.1 they are updated to use the new unstable prefix from MSC4407.
* Explicitly require matrix-widget-api ≥ 1.16.1
* remove TODO comment
* simplify type lint checks
This is needed for EW donwstream tests. Otherwise it will through:
Error: matrix-js-sdk/src/embedded.ts(417,21): error TS2345: Argument of
type 'string | number | boolean | string[]' is not assignable to
parameter of type 'number'.
---------
Co-authored-by: Timo K <toger5@hotmail.de>