mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-27 16:15:19 -04:00
Make 'event.redacts' never raise. (#6771)
There are quite a few places that we assume that a redaction event has a corresponding `redacts` key, which is not always the case. So lets cheekily make it so that event.redacts just returns None instead.
This commit is contained in:
parent
51fc3f693e
commit
fa4d609e20
5 changed files with 62 additions and 6 deletions
|
@ -951,7 +951,7 @@ class EventsStore(
|
|||
elif event.type == EventTypes.Message:
|
||||
# Insert into the event_search table.
|
||||
self._store_room_message_txn(txn, event)
|
||||
elif event.type == EventTypes.Redaction:
|
||||
elif event.type == EventTypes.Redaction and event.redacts is not None:
|
||||
# Insert into the redactions table.
|
||||
self._store_redaction(txn, event)
|
||||
elif event.type == EventTypes.Retention:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue