From 4dd9ea8f4fc002f35fa604361a792ea1d3d6671c Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Tue, 14 Dec 2021 14:22:01 +0000 Subject: Revert "Revert accidental fast-forward merge from v1.49.0rc1" This reverts commit 158d73ebdd61eef33831ae5f6990acf07244fc55. --- scripts-dev/federation_client.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'scripts-dev/federation_client.py') diff --git a/scripts-dev/federation_client.py b/scripts-dev/federation_client.py index 6f76c08fcf..c72e19f61d 100755 --- a/scripts-dev/federation_client.py +++ b/scripts-dev/federation_client.py @@ -15,6 +15,25 @@ # See the License for the specific language governing permissions and # limitations under the License. + +""" +Script for signing and sending federation requests. + +Some tips on doing the join dance with this: + + room_id=... + user_id=... + + # make_join + federation_client.py "/_matrix/federation/v1/make_join/$room_id/$user_id?ver=5" > make_join.json + + # sign + jq -M .event make_join.json | sign_json --sign-event-room-version=$(jq -r .room_version make_join.json) -o signed-join.json + + # send_join + federation_client.py -X PUT "/_matrix/federation/v2/send_join/$room_id/x" --body $( send_join.json +""" + import argparse import base64 import json -- cgit 1.4.1