Call appservice handler when seeing new events in the notifier
parent
ae724db899
commit
42090bcc7c
|
@ -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"""
|
||||
|
|
Loading…
Reference in New Issue