mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-13 15:20:38 -05:00
Implement soft fail
This commit is contained in:
parent
16c8b4ecbd
commit
a9de04be72
4 changed files with 95 additions and 1 deletions
|
|
@ -77,6 +77,20 @@ class _EventInternalMetadata(object):
|
|||
"""
|
||||
return getattr(self, "recheck_redaction", False)
|
||||
|
||||
def is_soft_failed(self):
|
||||
"""Whether the event has been soft failed.
|
||||
|
||||
Soft failed events should be handled as usual, except:
|
||||
1. They should not go down sync or event streams, or generally
|
||||
sent to clients.
|
||||
2. They should not be added to the forward extremities (and
|
||||
therefore not to current state).
|
||||
|
||||
Returns:
|
||||
bool
|
||||
"""
|
||||
return getattr(self, "soft_failed", False)
|
||||
|
||||
|
||||
def _event_dict_property(key):
|
||||
# We want to be able to use hasattr with the event dict properties.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue