mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:46:04 -04:00
Make sure a retention policy is a state event (#8527)
* Make sure a retention policy is a state event * Changelog
This commit is contained in:
parent
ec606ea9e3
commit
3ee97a2748
3 changed files with 8 additions and 0 deletions
|
@ -83,6 +83,9 @@ class EventValidator:
|
|||
Args:
|
||||
event (FrozenEvent): The event to validate.
|
||||
"""
|
||||
if not event.is_state():
|
||||
raise SynapseError(code=400, msg="must be a state event")
|
||||
|
||||
min_lifetime = event.content.get("min_lifetime")
|
||||
max_lifetime = event.content.get("max_lifetime")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue