matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.13k forks source link

Ensure local invited & knocking users leave before purge. #16559

Closed clokep closed 1 year ago

clokep commented 1 year ago

Currently when we purge a room only joined local users leave the room, stranding invites and knocking users in their old state.

This isn't a huge deal since well...you've purged the room and your own server doesn't know about it anymore. Other servers, however, will still see those users in those states and we should properly clean-up.

clokep commented 1 year ago

I'm guessing that this behaves in exactly the same way as the join->leave transition for joined users?

It should...except none of these are transmitted to users during the purging process due to #16001.