From a337d24d2a0a64c66e232b548e55e238eabbdc8d Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 31 May 2016 13:04:12 +0100 Subject: [PATCH] Initial Home page --- Home.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Home.md diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..3f39a8c --- /dev/null +++ b/Home.md @@ -0,0 +1,21 @@ +# Synapse wiki + +For now, this is just a quick dumping ground of useful Synapse snippets which otherwise are going to get lost across scrollback, gists, scripts etc. + +## Useful SQL queries + +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: +... + +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 INNER JOIN room_memberships AS m USING (room_id, event_id) WHERE room_id = '!cURbafjkfsMDVwdRDQ:matrix.org' AND membership = 'join';