From afd3e968b1e777a2a368cc5b6b3d37aafd89f66d Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Fri, 10 Mar 2017 14:48:42 +0100 Subject: [PATCH] Added a "how to vaporize a room the dangerous way" to the wiki. Locked myself out of a room and this cleared it up. --- Home.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index b69fcc1..01d47e7 100644 --- a/Home.md +++ b/Home.md @@ -7,16 +7,57 @@ For now, this is just a quick dumping ground of useful Synapse snippets which ot In future these should be wrapped up as a proper admin API (with a matching CLI tool). For now, here's the raw SQL: Deleting users: +--- ... Deleting your copy of a room: -... +--- + +**DISCLAIMER: Not verified by a main dev, just a user contributions (MAY EAT YOUR DATABASE):** +``` +DELETE FROM state_groups WHERE room_id=''; +DELETE FROM state_groups_state WHERE room_id=''; +DELETE FROM events WHERE room_id=''; +DELETE FROM event_json WHERE room_id=''; +DELETE FROM state_events WHERE room_id=''; +DELETE FROM current_state_events WHERE room_id=''; +DELETE FROM room_memberships WHERE room_id=''; +DELETE FROM feedback WHERE room_id=''; +DELETE FROM topics WHERE room_id=''; +DELETE FROM room_names WHERE room_id=''; +DELETE FROM rooms WHERE room_id=''; +DELETE FROM room_hosts WHERE room_id=''; +DELETE FROM event_forward_extremities WHERE room_id=''; +DELETE FROM event_backward_extremities WHERE room_id=''; +DELETE FROM event_edges WHERE room_id=''; +DELETE FROM room_depth WHERE room_id=''; +DELETE FROM state_forward_extremities WHERE room_id=''; +DELETE FROM event_auth WHERE room_id=''; +DELETE FROM room_aliases WHERE room_id=''; +DELETE FROM receipts_graph WHERE room_id=''; +DELETE FROM receipts_linearized WHERE room_id=''; +DELETE FROM event_search WHERE room_id=''; +DELETE FROM guest_access WHERE room_id=''; +DELETE FROM history_visibility WHERE room_id=''; +DELETE FROM room_tags WHERE room_id=''; +DELETE FROM room_tags_revisions WHERE room_id=''; +DELETE FROM room_account_data WHERE room_id=''; +DELETE FROM event_push_actions WHERE room_id=''; +DELETE FROM local_invites WHERE room_id=''; +DELETE FROM pusher_throttle WHERE room_id=''; +DELETE FROM event_reports WHERE room_id=''; +DELETE FROM public_room_list_stream WHERE room_id=''; +DELETE FROM stream_ordering_to_exterm WHERE room_id=''; +DELETE FROM appservice_room_list WHERE room_id=''; +``` What servers are my server talking to? +--- SELECT * FROM destinations; What servers are currently participating in this room? +--- SELECT DISTINCT split_part(state_key, ':', 2) FROM current_state_events AS c @@ -24,6 +65,7 @@ What servers are currently participating in this room? WHERE room_id = '!cURbafjkfsMDVwdRDQ:matrix.org' AND membership = 'join'; Manually resetting passwords: +--- scripts/hash_password UPDATE users SET password_hash='$2a$12$CC5r6fEe......' where name='@user:domain.com';