element-hq / element-hq/synapse
Invitations keep pending over federation when purging a room via the admin API
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
When purging a room pending invites to another homeserver's user over federation via the admin API, the room is being purged but the invitations won't be withdrawn at the other homeserver. This results in invitations to a room that no longer exists and users can thus neither accept nor reject.
### Steps to reproduce
- `@alice:server-a.tld` create a room on `server-a.tld`
- `@alice:server-a.tld` invites `@bob:server-b:tld`
- `@root:server-a.tld` deletes the room via https://element-hq.github.io/synapse/latest/admin_api/rooms.html#version-2-new-version with the purge flag
- the room is gone for `@alice:server-a.tld`
- `@bob:server-b.tld` still sees the pending invite
### Homeserver
closed federation
### Synapse Version
v1.128.0
### Installation Method
Docker (matrixdotorg/synapse)
### Database
single PostgreSQL
### Workers
Single process
### Platform
Kubernetes
### Configuration
_No response_
### Relevant log output
- [logs-server-a.txt](https://github.com/user-attachments/files/20574135/logs-server-a.txt)
- [logs-server-b.txt](https://github.com/user-attachments/files/20574136/logs-server-b.txt)
### Anything else that would be useful to know?
_No response_
Contributor guide
Research direction
Start with the admin API room deletion endpoint described in the issue, using the purge flag, and trace how pending federated invitations are handled during room purging. Reproduce the server-a/server-b scenario from the listed steps and verify that the remote homeserver no longer shows an invitation after the room is purged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100