summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorKateřina Churanová <katerina.churanova@gmail.com>2022-09-28 14:31:53 +0200
committerGitHub <noreply@github.com>2022-09-28 12:31:53 +0000
commit6caa3030835f879724c003a5b0dc66a6285451d8 (patch)
tree9e33ccb6e4e086c19e211bd8dc7ab21a52f41496 /synapse/events
parentAdd instruction for running unit tests in parallel (#13928) (diff)
downloadsynapse-6caa3030835f879724c003a5b0dc66a6285451d8.tar.xz
fix: Push notifications for invite over federation (#13719)
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index b2c9119fd0..030c3ca408 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -289,6 +289,10 @@ class _EventInternalMetadata:
         """
         return self._dict.get("historical", False)
 
+    def is_notifiable(self) -> bool:
+        """Whether this event can trigger a push notification"""
+        return not self.is_outlier() or self.is_out_of_band_membership()
+
 
 class EventBase(metaclass=abc.ABCMeta):
     @property