element-hq / element-hq/synapse
Deactivating a user via the admin api + enabling the GDP erasure triggers a rejoin after the leaves
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
when using the [user deactivation admin api](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html#deactivate-account) with the optional
```
{
"erase": true
}
```
the account in question gets properly deactivated AND THEN rejoins all rooms again at the end
### Steps to reproduce
- deactivate user with ` "erase": true`
### Homeserver
unredacted.org
### Synapse Version
1.149.1
### Installation Method
Other (please mention below)
### Database
PSQL
### Workers
Multiple workers
### Platform
mdad
### Configuration
_No response_
### Relevant log output
```shell
23:41
i-am-a-fake-user3 joined the room
23:43
i-am-a-fake-user3 removed their displayname
23:43
i-am-a-fake-user3 left the room
23:43
i-am-a-fake-user3 joined the room
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Research direction
Start with the user deactivation admin API entry point documented at the linked user_admin_api.html section, and reproduce the flow with erase=true on a multi-worker homeserver. Trace the deactivation and erasure sequence against the reported log events; done means the account is deactivated and erased without rejoining its rooms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100