matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.12k forks source link

Leave room with unknown room version #15785

Open MadLittleMods opened 1 year ago

MadLittleMods commented 1 year ago

Background

Synapse currently only supports leaving a room with a supported/known room version. This means you can get stuck in rooms with experimental room versions which are later dropped from Synapse.

If you try to leave a room with a room version that is no longer supported, the /leave request gives a 400 error with M_UNSUPPORTED_ROOM_VERSION

{
  "errcode": "M_UNSUPPORTED_ROOM_VERSION",
  "error": "Room !abc uses a room version org.matrix.mscxxx.test which is no longer supported"
}

The technical reason behind not being able to leave is that Synapse doesn't know how to resolve state in those rooms. Perhaps the spec needs some fallback mechanism for users wanting to escape or we can just make some assumptions and do our best effort at sending a leave.

What would you like to do?

Leave room with unknown/unsupported room version


Related issues:

clokep commented 1 year ago

Could we add a background update or something to purge those rooms before we remove the room version?

In the past we've kind of just said "oh well that's on you for doing experimental things" and purged the rooms from matrix.org.

MadLittleMods commented 1 year ago

Could we add a background update or something to purge those rooms before we remove the room version?

It's kinda annoying to do it this way (for us as a maintenance task and for users). As @ara4n mentioned in the other issue mentioned, it would be nice if people could still access the events in the room (even if that is some degraded form like only being able to see current state events) and leave like normal.