This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add experimental support for MSC3391: deleting account data #14714
Merged
Commits on Dec 20, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8173de4 - Browse repository at this point
Copy the full SHA 8173de4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cd633f - Browse repository at this point
Copy the full SHA 8cd633fView commit details -
Add replication methods for removing account data
We also rename existing account data methods, explicitly stating that they're for adding account data.
Configuration menu - View commit details
-
Copy full SHA for d338a00 - Browse repository at this point
Copy the full SHA d338a00View commit details -
Add storage functions for deleting user/room account data
We "delete" account data by UPDATE'ing any existing account data type to have a content of "{}". Clients will receive this change as is, which MSC3391 defines as the method for telling clients that an account data type has been deleted. We explicitly don't update rows that already have a content of "{}", such that we can use the number of update'd rows by the txn to check whether a delete actually occurred or not. This saves us a replication request/module API call in the case that it didn't, while retaining idempotency at the client-facing level. This comit additionally adds some method docstrings for simple_update{,_txn}.
Configuration menu - View commit details
-
Copy full SHA for 36d3bd2 - Browse repository at this point
Copy the full SHA 36d3bd2View commit details -
Add handler, servlet methods for deleting user/room account data
Servlet methods, which call handler methods, which call the new storage methods.
Configuration menu - View commit details
-
Copy full SHA for dcfacc8 - Browse repository at this point
Copy the full SHA dcfacc8View commit details -
Allow deleting account data by PUT'ing with empty content
MSC3391 specifies that for backwards compatibility purposes, setting an account data type's content to {} should be equivalent to deleting that account data. That call should succeed regardless of whether the account data existed previously or not.
Configuration menu - View commit details
-
Copy full SHA for ef562a2 - Browse repository at this point
Copy the full SHA ef562a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f81122 - Browse repository at this point
Copy the full SHA 0f81122View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2937973 - Browse repository at this point
Copy the full SHA 2937973View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0520e4c - Browse repository at this point
Copy the full SHA 0520e4cView commit details
Commits on Dec 29, 2022
-
Simplify txn.rowcount return check
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 80e991f - Browse repository at this point
Copy the full SHA 80e991fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c62cd1 - Browse repository at this point
Copy the full SHA 3c62cd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36eab04 - Browse repository at this point
Copy the full SHA 36eab04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2aa8986 - Browse repository at this point
Copy the full SHA 2aa8986View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccd4225 - Browse repository at this point
Copy the full SHA ccd4225View commit details -
Convert queries in get_account_data_for_user_txn to raw SQL
Doing the filtering in SQL should theoretically be more efficient.
Configuration menu - View commit details
-
Copy full SHA for 554dd36 - Browse repository at this point
Copy the full SHA 554dd36View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.