Script that redacts (erases) every message in a room.
Go to file
cynic 1ea0931ded Update 2024-06-03 04:45:44 -05:00
.gitignore Initial commit 2024-06-01 11:31:32 -05:00
LICENSE Initial commit 2024-06-01 11:31:32 -05:00 Update 2024-06-01 16:08:47 -05:00
element.png Upload files to "/" 2024-06-01 15:38:26 -05:00
element_room_id.png Upload files to "/" 2024-06-01 15:59:39 -05:00
image.jpg Upload files to "/" 2024-06-01 11:34:59 -05:00 Update 2024-06-03 04:45:44 -05:00

Redact Matrix

Small script that redacts (deletes) every message in a given room.



Download the script to your computer.

git clone
cd redact-matrix

Get your access token

On Cinny, for example, go to Firefox's Inspect tool, to the Storage tab, and copy your cinny_access_token.


Other clients may have a similar key with this value.

For example on Element it is found at: ⚙️ Quick settings > All Settings > Help & About > Advanced > Access Token


The token is different for each session and remains valid as long as you don't log out.

Open the script with your favorite text editor and set the value for homeserver with the domain of the matrix instance you're logged in, and the access_token with the value you just extracted from the browser. Save the file.

Get the Matrix room id

On Cinny you can do this simply by clicking on the room's name.

The id will be right below the title of the room, and it looks like this: !cdPNSVToruMtXqGznY:domain.tld

On Element it can be found at Room info > Settings > Advanced > Internal room ID


Run the script

python '!cdPNSVToruMtXqGznY:domain.tld'


It will redact (delete) each of your contacts' comments too, so long as you got permissions over them, which is usually the case with every private room initiated by you.