diff options
author | Erik Johnston <erik@matrix.org> | 2019-06-19 13:19:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 13:19:18 +0100 |
commit | e0be8d70164b814688261c598947979117f0aca0 (patch) | |
tree | c1fbee26a68bdc9db3e65a3886093fbff305ffc4 /synapse/events | |
parent | Merge pull request #5490 from matrix-org/rav/xmlsec_in_docker (diff) | |
parent | Run as background process and fix comments (diff) | |
download | synapse-e0be8d70164b814688261c598947979117f0aca0.tar.xz |
Merge pull request #5480 from matrix-org/erikj/extremities_dummy_events
Add experimental option to reduce extremities.
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index 1edd19cc13..7154bcbea6 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -92,6 +92,18 @@ class _EventInternalMetadata(object): """ return getattr(self, "soft_failed", False) + def should_proactively_send(self): + """Whether the event, if ours, should be sent to other clients and + servers. + + This is used for sending dummy events internally. Servers and clients + can still explicitly fetch the event. + + Returns: + bool + """ + return getattr(self, "proactively_send", True) + def _event_dict_property(key): # We want to be able to use hasattr with the event dict properties. |