Implement room purge after last local user leaves. (resolves #83)

Consume a state_lock for room delete call.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-08-30 04:40:26 +00:00
parent 7c19d1e1ff
commit aa413ae601
5 changed files with 121 additions and 35 deletions

View File

@@ -1929,6 +1929,19 @@ pub struct Config {
#[serde(default)]
pub hydra_backports: bool,
/// Delete rooms when the last user from this server leaves. This feature is
/// experimental and for the purpose of least-surprise is not enabled by
/// default but can be enabled for deployments interested in conserving
/// space. It may eventually default to true in a future release.
///
/// Note that not all pathways which can remove the last local user
/// currently invoke this operation, so in some cases you may find the room
/// still exists.
///
/// default: false
#[serde(default)]
pub delete_rooms_after_leave: bool,
// external structure; separate section
#[serde(default)]
pub blurhashing: BlurhashConfig,