-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than cutting-and-pasting the implementation of ShutdownRoom, please could you factor out the code to a handler
so that it can be shared?
By the way, please could you join #synapse-dev:matrix.org
so that we can collaborate more easily on some of this stuff? It's not very high-volume.
I have moved it to an own handler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bunch of stylistic things here. Thanks!
Co-authored-by: Richard van der Hoff <[email protected]>
@richvdh: ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nearly there!
Just a feedback from reading this pull request as an outsider:
The "improvement" that also made it into the documentation description of this new function seems quite confusing to me. To me it looks like essentially this new "delete" just does shutdown followed by purge, is that not all it does? If the "improvement" just means the code is cleaned up as well then I suggest it should be removed from the code comment / documentation description since it seems irrelevant and misleading at best in there, it sounds like it does more than just shutdown & purge but the details are secret for some reason. Otherwise I suggest that it is clarified what exactly this "improvement" means in terms of actual behavior. |
@ell1e : I don't disagree: that line isn't terribly clear. That said, I don't want to hold this PR up on another round of documentation tweaking. For the record, the new API is slightly more flexible than using the two existing APIs separately (for example: (Aside: when you comment on a PR, please can you comment on a line in the "files changed" tab. That (a) helps people see which bit of the PR you're talking about, and (b) means that the conversation is threaded rather than being mixed in with all the other traffic on the PR.) |
Ah bother. @dklimpel I don't have sign-off from you. Please can you add a |
@richvdh I have added it #7613 (comment) |
* commit '491f0dab1': Add delete room admin endpoint (#7613)
The Delete Room admin API allows server admins to remove rooms from server
and block these rooms.
DELETE /_synapse/admin/v1/rooms/<room_id>
It is a combination and improvement of "Shutdown room" and "Purge room" API.
Fixes: #6425
It also fix a bug in synapse/storage/data_stores/main/room.py in
get_room_with_stats
.It should return
None
if the room is unknown. But it returns anIndexError
.synapse/synapse/storage/data_stores/main/room.py
Lines 99 to 105 in 901b1fa
Related to:
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.Signed-off-by: Dirk Klimpel [email protected]