diff options
-rw-r--r-- | bash/api.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bash/api.sh b/bash/api.sh index 0757a60..5f479da 100644 --- a/bash/api.sh +++ b/bash/api.sh @@ -117,3 +117,12 @@ matrix_send() { # args: roomid, eventType(m.room.message), txn, msg local _out="$(req PUT "$_url" -d "$4")" jq . "$_out" } + +# 6.5.2.1 PUT /_matrix/client/r0/rooms/{roomId}/redact/{eventId}/{txnId} + +matrix_redact() { # args: roomid, event id, txn, reason + local _url="$SERVER_URL/_matrix/client/r0/rooms/$1/redact/$2/$3?access_token=$TOKEN" + local _out="$(req PUT "$_url" -d "{\"reason\":\"$4\"}")" + jq . "$_out" +} + |