diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2021-11-19 18:37:02 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2021-11-19 20:09:30 +0000 |
commit | 179dd5ae0cc3c25181435e5108bd50be2b610ab0 (patch) | |
tree | f0f1bd700c98a432db9e28fefa1e18dc5efce55c | |
parent | Deduplicate ephemeral events to send conditional (diff) | |
download | synapse-179dd5ae0cc3c25181435e5108bd50be2b610ab0.tar.xz |
_handle_to_device -> _get_to_device_messages
-rw-r--r-- | synapse/handlers/appservice.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index 88806bb78c..816b51e682 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -321,8 +321,12 @@ class ApplicationServicesHandler: elif stream_key == "to_device_key": # Retrieve a list of to-device message events, as well as the # maximum stream token of the messages we were able to retrieve. - events = await self._handle_to_device(service, new_token, users) - self.scheduler.submit_ephemeral_events_for_as(service, events) + to_device_messages = await self._get_to_device_messages( + service, new_token, users + ) + self.scheduler.submit_ephemeral_events_for_as( + service, to_device_messages + ) # Persist the latest handled stream token for this appservice await self.store.set_type_stream_id_for_appservice( @@ -462,7 +466,7 @@ class ApplicationServicesHandler: return events - async def _handle_to_device( + async def _get_to_device_messages( self, service: ApplicationService, new_token: int, |