matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
183 stars 94 forks source link

Ability to delete rooms. #431

Open ara4n opened 5 years ago

ara4n commented 5 years ago

A fairly common request is the ability to "delete a room".

In practice, this could mean someone with sufficient power marking with room with a tombstone with metadata requesting all participating servers drop the room from their DB. However, this would vandalise everyone else's copy of the room.

Perhaps a better bet would be to support room garbage collection, such that if everyone on your local server has hit 'leave' and 'forget' on their copy of the room, the room is actually removed from the server.

turt2live commented 5 years ago

https://matrix.org/docs/spec/client_server/unstable.html#post-matrix-client-r0-rooms-roomid-forget already says:

If all users on a homeserver forget a room, the room is eligible for deletion from that homeserver.

so this sounds like an implementation detail which synapse doesn't support?

ara4n commented 5 years ago

true. i guess i'm more trying to work out what use case something like https://twitter.com/cartocalypse/status/1095322661322977281 is asking for.

turt2live commented 5 years ago

I suppose coming from a UI perspective we don't really have the endpoint for this, in which case a dedicated /delete enpoint makes sense (using the behaviour you've described).

dud1337 commented 4 years ago

Using a synapse for a workplace server, this would make usability significantly easier. In particular for short-term rooms, a room administrator should be able to close a room. Equivalent to kicking everyone and waiting for garbage collection.

ghost commented 4 years ago

Any update on this? Seems like it would be a fairly common thing to do.

hannojg commented 4 years ago

There is this PR: https://github.com/matrix-org/synapse/pull/7613

ell1e commented 4 years ago

@hannojg this is just for server admins though, it would be nice if this could be extended to room admins as well (so e.g. random people creating personal rooms on matrix.org can remove them again if they want to).

rugk commented 4 years ago

See

Possibbility to clear whole chat to remove all messages / destroy chat room in https://github.com/vector-im/riot-web/issues/14401

If you want, I can copy and recreate this issue here?

ell1e commented 4 years ago

I mean there is a difference for private chats and public rooms. That issue appears to be mostly concerned with private chats I think, I am thinking of public rooms I created but then all room admins decide the room is no longer to be kept (e.g. because it moved elsewhere) and want to actually delete it. So I'm looking beyond just removing the messages.

Basically, history clearing seems related, but not necessarily the same thing. Although I guess both could be solved by allowing the room owners (!= just server admins) to delete a room entirely with all its history and contents, since that kind of indirectly also clears the room history.

rugk commented 4 years ago

Fine, created https://github.com/matrix-org/matrix-doc/issues/2686.

richvdh commented 4 years ago

@hannojg this is just for server admins though, it would be nice if this could be extended to room admins as well (so e.g. random people creating personal rooms on matrix.org can remove them again if they want to).

For clarity: when @ell1e said "this is just for server admins", I think they were referring to matrix-org/synapse#7613. That PR adds an API for use by server admins. This issue (#1882) covers the usecase of room admins deciding that a room should be deleted.

ell1e commented 4 years ago

@richvdh sorry, yes. that is exactly what I meant, I apologize for my unclear use of "this" that was somewhat confusing in retrospect

silvernode commented 3 years ago

I wanted to delete my room and recreate it but I can't, so now the new room has to have a different alias. This is unfortunate since I already left the original room, hoping that would delete it if nobody else was present and now I can't get back in to change the alias in order to give it to my new room.

TheEvilSkeleton commented 3 years ago

@silvernode contacting the homeserver maintainers and asking them if they can remove the room should work. That's how we did.

silvernode commented 3 years ago

@silvernode contacting the homeserver maintainers and asking them if they can remove the room should work. That's how we did.

I can try sending an email to matrix.org i suppose. Thanks for the reply.

guglovich commented 2 years ago

Relevant. While I was figuring out what was what, I already had several rooms of corpses with occupied names. It's too bad that such a basic function as removal was not implemented. And depending on the client the rooms can be found, then can not be found.

PC-Admin commented 2 years ago

I tried using the delete room API to get rid of the rooms with no local users on my server, and it was a huge failure, for every purged room it created a new empty room with the server admin user inside it (even though there were 0 local users to push to that room!). I ended up increasing the size of my database when i was looking to shrink it... :(

There should at least be an option for server admins to delete rooms in a way which reclaims disk space before we go worrying about regular users.

turt2live commented 2 years ago

@PC-Admin that sounds like an implementation bug rather than a spec issue. Matrix doesn't have a way to delete rooms yet, hence the open issue.

bradkane commented 2 years ago

Would be helpful to allow "merge and delete" functionality in addition to just delete.

aschrijver commented 9 months ago

I am with my matrix.org account admin of a fair amount of (both public and private) chatrooms. One has to be really conservative in creating rooms. Once created you are stuck with them, and also the assigned name cannot be reused. I guess lacking removal features the best-practice to phase out a public chatroom is:

More tips to improve this best-practice?

sanjacob commented 2 weeks ago

@aschrijver names are reusable:

that being said, I support the room deletion capability