You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
When sending an event, the client sets a locally unique txnID on it, which serves two purposes:
deduplicating events in case of network failures/retries
when the client receives an event from /sync that they created, map it correctly to the locally-created event (for proper local echo)
The problem is, this txnID is currently bound to the user ID and the access token ID. Since MSC2918 (refresh tokens), a single client might deal with multiple access tokens, meaning that the current scenario is possible:
client starts a /sync with its current access token
this token is about to expire, so it refreshes it and gets a new access token
the client sends a new event, with a random txnID, using the new access token
/sync gets back, with the new event but not the txnID, since this /sync was done with another access token than when the event was created
I think the proper way to deal with this would be to have the txnIDs bound to devices instead of access tokens.
This is also relevant for the OIDC patches, since we don't really have access token IDs, but we do have the device ID.
What I would like to do is:
add a column to the event_txn_id to store the device ID