Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Derive users to notify application services of edus from user streams in on_new_event #11903

Closed
wants to merge 3 commits into from

Conversation

anoadragon453
Copy link
Member

@anoadragon453 anoadragon453 commented Feb 3, 2022

Otherwise we were completely ignoring all users discovered from rooms being passed to on_new_event, here:

https://github.com/matrix-org/synapse/blob/c15d37575882b976a99e5e616d738d904ba3e754/synapse/notifier.py#L437-L438

Luckily, the only EDU-handling caller that sets the rooms argument of on_new_event is the handler of device list updates, which haven't yet been sent to application services before. So this didn't cause any EDUs to get dropped on the floor. But it's something that we'll need to fix for implementing #11881.

Note that this is separate from, and does not fix #11152.

Best reviewed commit-by-commit.

Otherwise we were completely ignoring all users discovered from rooms being passed
to this function.
I broke off this refactoring at _get_to_device_messages, as this PR would start to become
much bigger otherwise.
@anoadragon453 anoadragon453 marked this pull request as ready for review February 3, 2022 15:42
@anoadragon453 anoadragon453 requested a review from a team as a code owner February 3, 2022 15:42
@anoadragon453 anoadragon453 removed the request for review from a team February 3, 2022 15:59
@anoadragon453
Copy link
Member Author

anoadragon453 commented Feb 3, 2022

It turns out user and room streams are only created on calls to /sync or /events, which applications services wouldn't and shouldn't have to do in this context.

So using the streams here is not a good solution for this use-case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Room namespace registrations are not considered when sending EDUs to Application Services
1 participant