@@ -205,14 +205,12 @@ def notify_interested_services_ephemeral(
205205 users : Collection [Union [str , UserID ]],
206206 ) -> None :
207207 """
208- This is called by the notifier in the background when
209- an ephemeral event is handled by the homeserver.
208+ This is called by the notifier in the background when an ephemeral event is handled
209+ by the homeserver.
210210
211- This will determine which appservices are
212- interested in the event, and submit them.
211+ This will determine which appservices are interested in the event, and submit them.
213212
214- Events will only be pushed to appservices
215- that have opted into ephemeral events
213+ Events will only be pushed to appservices that have opted into ephemeral events
216214
217215 Args:
218216 stream_key: The stream the event came from.
@@ -225,7 +223,7 @@ def notify_interested_services_ephemeral(
225223 `msc2409_to_device_messages_enabled` config option is set to true.
226224
227225 Ephemeral events will only be pushed to appservices that have opted into
228- them.
226+ them with the ephemeral registration file option enabled .
229227
230228 Appservices will only receive ephemeral events that fall within their
231229 registered user and room namespaces.
@@ -345,7 +343,7 @@ async def _notify_interested_services_ephemeral(
345343 and self .msc2409_to_device_messages_enabled
346344 ):
347345 # Retrieve an iterable of to-device message events, as well as the
348- # maximum stream token we were able to retrieve.
346+ # maximum stream token of the messages we were able to retrieve.
349347 events , max_stream_token = await self ._handle_to_device (
350348 service , new_token , users
351349 )
@@ -356,6 +354,7 @@ async def _notify_interested_services_ephemeral(
356354
357355 # TODO: If max_stream_token != new_token, schedule another transaction immediately,
358356 # instead of waiting for another to-device to be sent?
357+ # https://github.com/matrix-org/synapse/issues/11150#issuecomment-960726449
359358
360359 # Persist the latest handled stream token for this appservice
361360 await self .store .set_type_stream_id_for_appservice (
@@ -416,16 +415,6 @@ async def _handle_to_device(
416415 limit = MAX_TO_DEVICE_MESSAGES_PER_AS_TRANSACTION ,
417416 )
418417
419- logger .info (
420- "*** Users: %s, from: %s, to: %s" ,
421- users_appservice_is_interested_in ,
422- from_key ,
423- new_token ,
424- )
425- logger .info (
426- "*** Got to-device message: %s" , recipient_user_id_device_id_to_messages
427- )
428-
429418 # According to MSC2409, we'll need to add 'to_user_id' and 'to_device_id' fields
430419 # to the event JSON so that the application service will know which user/device
431420 # combination this messages was intended for.
0 commit comments