Remove exclude_from_upgrade

andybalaam/deleting-state
Andy Balaam 11 months ago
parent 158146ed3f
commit d0e774e1cc

@ -524,8 +524,10 @@ The server should copy all state except:
mxid. (If MSC3779 "Owned state events" is merged, user-scoped state will also mxid. (If MSC3779 "Owned state events" is merged, user-scoped state will also
include anything with a `state_key` that starts with the user's mxid plus include anything with a `state_key` that starts with the user's mxid plus
underscore. underscore.
* State whose contents include a top-level property `exclude_from_upgrade:
true`. Note: if a client creates custom state events that for some reason should not
survive a room upgrade, the client should mark them as obsolete before the
upgrade is performed.
### Proposed spec wording change ### Proposed spec wording change
@ -543,8 +545,6 @@ under "Room Upgrades", step 3 should be updated to read:
> * Obsolete state, as defined in section ... > * Obsolete state, as defined in section ...
> * User-scoped state i.e. any state whose `state_key` is equal to the sender's > * User-scoped state i.e. any state whose `state_key` is equal to the sender's
> mxid. > mxid.
> * State whose contents include a top-level property `exclude_from_upgrade:
> true`.
(Note that if MSC3779 is merged, user-scoped state will need a different (Note that if MSC3779 is merged, user-scoped state will need a different
definition.) definition.)
@ -581,10 +581,10 @@ The existing spec states:
> them, such as events outside of the Matrix namespace where clients may rely > them, such as events outside of the Matrix namespace where clients may rely
> on the sender to match certain criteria. > on the sender to match certain criteria.
Instead, we propose including all events except those that explicitly exclude Instead, we propose including all events except those that are considered
themselves with `exclude_from_upgrade: true` in their contents. This requires obsolete, and ones in the user's namespace. This change might be surprising to
anyone using non-upgradable state events to notice this MSC and add that some clients who use custom state events, and rely on the `sender` property for
property. their behaviour.
### Alternatives ### Alternatives
@ -599,6 +599,11 @@ events. Of course, the definition of "between" needs to be carefully crafted,
and, if possible, some provision to prevent the room founder from forking the and, if possible, some provision to prevent the room founder from forking the
room later and modifying the outcome would be useful. room later and modifying the outcome would be useful.
An earlier draft proposed an additional `exclude_from_upgrade` property on state
events to allow explicitly avoiding copying some events, but no clear use case
could be found for this that is not covered by simply marking events that are no
longer needed as obsolete.
### Security considerations ### Security considerations
New state events are created by the upgrading user, so it may be possible for New state events are created by the upgrading user, so it may be possible for

Loading…
Cancel
Save