Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e2a4ba6

Browse files
authored
Add docs for undoing room shutdowns (#7998)
These docs were tested successfully in production by a customer, so it's probably fine.
1 parent 6d4b790 commit e2a4ba6

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

changelog.d/7998.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add documentation for how to undo a room shutdown.

docs/admin_api/shutdown_room.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You will need to authenticate with an access token for an admin user.
3333
* `message` - Optional. A string containing the first message that will be sent as
3434
`new_room_user_id` in the new room. Ideally this will clearly convey why the
3535
original room was shut down.
36-
36+
3737
If not specified, the default value of `room_name` is "Content Violation
3838
Notification". The default value of `message` is "Sharing illegal content on
3939
othis server is not permitted and rooms in violation will be blocked."
@@ -72,3 +72,23 @@ Response:
7272
"new_room_id": "!newroomid:example.com",
7373
},
7474
```
75+
76+
## Undoing room shutdowns
77+
78+
*Note*: This guide may be outdated by the time you read it. By nature of room shutdowns being performed at the database level,
79+
the structure can and does change without notice.
80+
81+
First, it's important to understand that a room shutdown is very destructive. Undoing a shutdown is not as simple as pretending it
82+
never happened - work has to be done to move forward instead of resetting the past.
83+
84+
1. For safety reasons, it is recommended to shut down Synapse prior to continuing.
85+
2. In the database, run `DELETE FROM blocked_rooms WHERE room_id = '!example:example.org';`
86+
* For caution: it's recommended to run this in a transaction: `BEGIN; DELETE ...;`, verify you got 1 result, then `COMMIT;`.
87+
* The room ID is the same one supplied to the shutdown room API, not the Content Violation room.
88+
3. Restart Synapse (required).
89+
90+
You will have to manually handle, if you so choose, the following:
91+
92+
* Aliases that would have been redirected to the Content Violation room.
93+
* Users that would have been booted from the room (and will have been force-joined to the Content Violation room).
94+
* Removal of the Content Violation room if desired.

0 commit comments

Comments
 (0)