@@ -205,14 +205,12 @@ def notify_interested_services_ephemeral(
205
205
users : Collection [Union [str , UserID ]],
206
206
) -> None :
207
207
"""
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.
210
210
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.
213
212
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
216
214
217
215
Args:
218
216
stream_key: The stream the event came from.
@@ -225,7 +223,7 @@ def notify_interested_services_ephemeral(
225
223
`msc2409_to_device_messages_enabled` config option is set to true.
226
224
227
225
Ephemeral events will only be pushed to appservices that have opted into
228
- them.
226
+ them with the ephemeral registration file option enabled .
229
227
230
228
Appservices will only receive ephemeral events that fall within their
231
229
registered user and room namespaces.
@@ -345,7 +343,7 @@ async def _notify_interested_services_ephemeral(
345
343
and self .msc2409_to_device_messages_enabled
346
344
):
347
345
# 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.
349
347
events , max_stream_token = await self ._handle_to_device (
350
348
service , new_token , users
351
349
)
@@ -356,6 +354,7 @@ async def _notify_interested_services_ephemeral(
356
354
357
355
# TODO: If max_stream_token != new_token, schedule another transaction immediately,
358
356
# instead of waiting for another to-device to be sent?
357
+ # https://github.com/matrix-org/synapse/issues/11150#issuecomment-960726449
359
358
360
359
# Persist the latest handled stream token for this appservice
361
360
await self .store .set_type_stream_id_for_appservice (
@@ -416,16 +415,6 @@ async def _handle_to_device(
416
415
limit = MAX_TO_DEVICE_MESSAGES_PER_AS_TRANSACTION ,
417
416
)
418
417
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
-
429
418
# According to MSC2409, we'll need to add 'to_user_id' and 'to_device_id' fields
430
419
# to the event JSON so that the application service will know which user/device
431
420
# combination this messages was intended for.
0 commit comments