diff options
author | Kateřina Churanová <katerina.churanova@gmail.com> | 2022-09-28 14:31:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 12:31:53 +0000 |
commit | 6caa3030835f879724c003a5b0dc66a6285451d8 (patch) | |
tree | 9e33ccb6e4e086c19e211bd8dc7ab21a52f41496 /synapse/events | |
parent | Add instruction for running unit tests in parallel (#13928) (diff) | |
download | synapse-6caa3030835f879724c003a5b0dc66a6285451d8.tar.xz |
fix: Push notifications for invite over federation (#13719)
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/__init__.py | 4 |
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 |