2020-02-11 19:01:32 +01:00
|
|
|
#!/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=
|
2021-10-06 22:06:03 +02:00
|
|
|
HOMESERVER=matrix-client.matrix.org
|
2020-02-11 19:01:32 +01:00
|
|
|
|
|
|
|
set -x
|
2022-02-18 12:21:14 +01:00
|
|
|
curl -s -X PUT -H "Authorization: Bearer $ACCESSTOKEN" -H "Content-Type: application/json" --data-binary "{\"replacement_room\":\"$NEWROOMID\"}" "https://$HOMESERVER/_matrix/client/v3/rooms/$OLDROOMID/state/m.room.tombstone"
|
2020-02-11 19:01:32 +01:00
|
|
|
set +x
|