Script that redacts (erases) every message in a room.
Go to file
2024-06-01 15:32:08 -05:00
.gitignore Initial commit 2024-06-01 11:31:32 -05:00
image.jpg Upload files to "/" 2024-06-01 11:34:59 -05:00
LICENSE Initial commit 2024-06-01 11:31:32 -05:00
README.md Update README.md 2024-06-01 15:32:08 -05:00
redact_all_messages.py generate transaction id 2024-06-01 14:56:05 -05:00

Redact Matrix

Script that redacts (erases) every message in a room.


Usage

Get your access token

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

image

Other clients may have a similar key with this value. The token is different for each session and remains valid as long as you don't log out.

Open the redact_all_messages.py 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 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

Run the script

python redact_all_messages.py '!cdPNSVToruMtXqGznY:domain.tld'

Note

It will redact (erasing) 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.