mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
e746f80b4f
Internally the push rules module uses a `pattern_type` property for `event_match` conditions (and `related_event_match`) to mark the condition as matching the current user's Matrix ID or localpart. This is leaky to the Client-Server API where a user can successfully set a condition which provides `pattern_type` instead of `pattern` (note that there's no benefit to doing this -- the user can just use their own Matrix ID or localpart instead). When serializing back to the client the `pattern_type` property is converted into a proper `pattern`. The following changes are made to avoid this: * Separate the `KnownCondition::EventMatch` enum value into `EventMatch` and `EventMatchType`, each with their own expected properties. (Note that a similar change is made for `RelatedEventMatch`.) * Make it such that the `pattern_type` variants serialize to the same condition kind, but cannot be deserialized (since they're only provided by base rules). * As a final tweak, convert `user_id` vs. `user_localpart` values into an enum. |
||
---|---|---|
.. | ||
.gitignore | ||
14026.doc | ||
14918.misc | ||
15044.feature | ||
15071.doc | ||
15088.bugfix | ||
15092.bugfix | ||
15093.bugfix | ||
15095.misc | ||
15103.misc | ||
15107.feature | ||
15112.doc | ||
15116.feature | ||
15135.misc | ||
15137.removal | ||
15138.misc | ||
15139.doc | ||
15143.misc | ||
15146.misc | ||
15148.doc | ||
15152.misc | ||
15154.misc | ||
15155.misc | ||
15156.misc | ||
15157.misc | ||
15158.misc | ||
15159.misc | ||
15160.misc | ||
15167.misc | ||
15168.doc |