Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove admin/pm rooms when the matrix-side user leaves to allow server to GC #1258

Merged
merged 2 commits into from
Mar 2, 2021

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented Mar 1, 2021

Fixes #1207

The idea here is that the rooms serve no purpose once the Matrix user has left them, so we might as well leave the bridge users from the room too and then Synapse can garbage collect the room (as it is unjoinable). Of course, matrix-org/synapse#4720 needs to happen first.

@Half-Shot Half-Shot requested a review from a team March 1, 2021 14:12
Copy link
Member

@benparsons benparsons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pacien
Copy link

pacien commented Mar 1, 2021

If I understand this correctly, this makes ghost users leave rooms only when real Matrix users are leaving them.

Is this also handling the case in which the real Matrix user already has left the room in the past (before this patch), leaving some rooms with only ghost users?

@Half-Shot
Copy link
Contributor Author

Is this also handling the case in which the real Matrix user already has left the room in the past (before this patch), leaving some rooms with only ghost users?

This would probably be better handled by a script that iterates the database, parts the ghost and deletes the entry. I can probably write one up in a separate PR.

@Half-Shot Half-Shot merged commit 29c5450 into develop Mar 2, 2021
@Half-Shot Half-Shot deleted the hs/delete-room-on-matrix-leave branch March 2, 2021 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Private/direct message history retention
3 participants