From 64d81b0340ca1a71428417e96ead51489a3c6eef Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Tue, 11 Feb 2020 20:01:32 +0200 Subject: [PATCH] add matrix-tombstone-room.bash --- bash/matrix-tombstone-room.bash | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bash/matrix-tombstone-room.bash diff --git a/bash/matrix-tombstone-room.bash b/bash/matrix-tombstone-room.bash new file mode 100755 index 0000000..034eb6c --- /dev/null +++ b/bash/matrix-tombstone-room.bash @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# This is just step 3 from https://gist.github.com/turt2live/a99c8e794d6115d4ddfaadb72aabf063 +# which is the one I have a need to perform the most as I have ended up with +# some duplicate rooms. + +ACCESSTOKEN= +OLDROOMID= +NEWROOMID= +HOMESERVER=chat.privacytools.io + +set -x +curl -s -X PUT -H "Authorization: Bearer $ACCESSTOKEN" -H "Content-Type: application/json" --data-binary "{\"replacement_room\":\"$NEWROOMID\"}" "https://$HOMESERVER/_matrix/client/r0/rooms/$OLDROOMID/state/m.room.tombstone" +set +x