tweak payload for invite
This commit is contained in:
parent
34973daf47
commit
43973232ab
1 changed files with 4 additions and 1 deletions
|
@ -78,11 +78,14 @@ class ChannelMonitor(threading.Thread):
|
||||||
|
|
||||||
def invite_room(self, user_id, roomid):
|
def invite_room(self, user_id, roomid):
|
||||||
url = self.matrix_api_url + '/rooms/' + roomid + "/invite"
|
url = self.matrix_api_url + '/rooms/' + roomid + "/invite"
|
||||||
|
headers = {"Content-Type": "application/json"}
|
||||||
params = {
|
params = {
|
||||||
'access_token': self.matrix_api_token,
|
'access_token': self.matrix_api_token,
|
||||||
|
}
|
||||||
|
body = {
|
||||||
'user_id': user_id
|
'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):
|
def send_message(self, roomid, msg):
|
||||||
url = self.matrix_api_url + '/rooms/' + roomid +'/send/m.room.message' + '/' + str(self.txId)
|
url = self.matrix_api_url + '/rooms/' + roomid +'/send/m.room.message' + '/' + str(self.txId)
|
||||||
|
|
Loading…
Reference in a new issue