From 43973232ab50a204b07bd571c3ea4faa73c2b83b Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Wed, 24 May 2017 21:05:55 -0700 Subject: [PATCH] tweak payload for invite --- pnut-bridge.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pnut-bridge.py b/pnut-bridge.py index 586eadb..71fe894 100644 --- a/pnut-bridge.py +++ b/pnut-bridge.py @@ -78,11 +78,14 @@ class ChannelMonitor(threading.Thread): def invite_room(self, user_id, roomid): url = self.matrix_api_url + '/rooms/' + roomid + "/invite" + headers = {"Content-Type": "application/json"} params = { 'access_token': self.matrix_api_token, + } + body = { 'user_id': user_id } - r = requests.post(url, params=params) + r = requests.post(url, headers=headers, params=params, data=json.dumps(body)) def send_message(self, roomid, msg): url = self.matrix_api_url + '/rooms/' + roomid +'/send/m.room.message' + '/' + str(self.txId)