diff options
author | Will Hunt <will@half-shot.uk> | 2020-09-21 15:10:37 +0100 |
---|---|---|
committer | Will Hunt <will@half-shot.uk> | 2020-09-21 15:10:37 +0100 |
commit | 42090bcc7cf84ae89e4aaad87872771a5995a652 (patch) | |
tree | e38b1b09f458580ad087fffd1797305501cb1e5f | |
parent | Changes to handlers to support fetching events for appservices (diff) | |
download | synapse-42090bcc7cf84ae89e4aaad87872771a5995a652.tar.xz |
Call appservice handler when seeing new events in the notifier
-rw-r--r-- | synapse/notifier.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index a8fd3ef886..48008e2c07 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -326,6 +326,12 @@ class Notifier: except Exception: logger.exception("Error notifying application services of event") + async def _notify_app_services_ephemeral(self, stream_key: str, new_token: Union[int, RoomStreamToken]): + try: + await self.appservice_handler.notify_interested_services_ephemeral(stream_key, new_token) + except Exception: + logger.exception("Error notifying application services of event") + async def _notify_pusher_pool(self, max_room_stream_id: int): try: await self._pusher_pool.on_new_notifications(max_room_stream_id) @@ -364,6 +370,11 @@ class Notifier: self.notify_replication() + # Notify appservices + run_as_background_process( + "_notify_app_services_ephemeral", self._notify_app_services_ephemeral, stream_key, new_token, + ) + def on_new_replication_data(self) -> None: """Used to inform replication listeners that something has happend without waking up any of the normal user event streams""" |