summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-10 18:54:03 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-10 18:54:03 +0000
commitc9eb99d25ba6182c5481858b3f95e58aea9f6188 (patch)
tree0c5be2aeb7bcfbb3eb948ea218fbe3a7eaeb1436 /synapse/events
parentOnly count non-cache state resolution (diff)
parentAdd experimental option to reduce extremities. (diff)
downloadsynapse-c9eb99d25ba6182c5481858b3f95e58aea9f6188.tar.xz
Add experimental option to reduce extremities.
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 1edd19cc13..f1fbb3d14a 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 eventm, 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.