Last active
October 19, 2020 15:12
-
-
Save t3chguy/2acbecee86f34af2691ddbbfacc2abb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hsurl="https://matrix.org" | |
access_token="this_was_totally_not_a_valid_token" | |
roomIds=($(curl "$hsurl/_matrix/client/r0/joined_rooms?access_token=$access_token" | tr '"' '\n' | grep !)) | |
for roomId in ${roomIds[@]} | |
do | |
curl -XPOST "$hsurl/_matrix/client/r0/rooms/$roomId/leave?access_token=$access_token" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment