element-hq / element-hq/synapse

Add deactivated_ts and retention policy for deactivated users

Open
#20,014 0 comments 0 reactions 0 assignees View on GitHub
A-Account-Deactivation
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

**Add deactivated_ts and retention policy for deactivated users:**

Currently, Synapse does not store a timestamp or any other information that indicates when a user was deactivated. Adding a deactivated_ts field would make it easier to track disabled accounts and manage user cleanup.

Additionally, it would be useful to have a configurable retention policy for deactivated users to allow automatic cleanup after a defined period.

Example configuration:

deactivated_user_retention: 180d

After the retention period expires, Synapse could automatically remove users that have remained deactivated for longer than the configured duration.

Contributor guide

Open the contributing guide

Research direction

Start by locating where Synapse stores user account state and where deactivated users are processed or cleaned up. Trace the existing deactivation flow and configuration handling before deciding how the timestamp and retention period fit together. Done means deactivation records a timestamp and a configurable policy removes users after the configured duration, with coverage for both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.