From 77bf29dabb50e9643b056c14629f52fd70785ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?poljar=20=28Damir=20Jeli=C4=87=29?= Date: Wed, 17 Jan 2018 10:02:11 +0100 Subject: [PATCH] Fix the message posting HTTP API. --- weechat-matrix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/weechat-matrix.py b/weechat-matrix.py index a5d6a03..dcbb251 100644 --- a/weechat-matrix.py +++ b/weechat-matrix.py @@ -289,14 +289,15 @@ class MatrixMessage: ) elif message_type == MessageType.SEND: - path = ("{api}/rooms/{room}/send/m.room.message?" + path = ("{api}/rooms/{room}/send/m.room.message/{tx_id}?" "access_token={access_token}").format( api=MATRIX_API_PATH, room=room_id, + tx_id=get_transaction_id(server), access_token=server.access_token) self.request = HttpRequest( - RequestType.POST, + RequestType.PUT, server.address, server.port, path,