From 42090bcc7cf84ae89e4aaad87872771a5995a652 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Mon, 21 Sep 2020 15:10:37 +0100 Subject: Call appservice handler when seeing new events in the notifier --- synapse/notifier.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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""" -- cgit 1.4.1