mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:45:03 -04:00
Removed MessageRestServlet, use RoomSendEventRestServlet instead. Updated cmdclient, tests and webclient. All appears to work.
This commit is contained in:
parent
ad6d5ac06c
commit
5a93bfe1f0
6 changed files with 25 additions and 87 deletions
|
@ -99,14 +99,14 @@ class RestTestCase(unittest.TestCase):
|
|||
defer.returnValue(response)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def send(self, room_id, sender_id, body=None, msg_id=None, tok=None,
|
||||
def send(self, room_id, body=None, txn_id=None, tok=None,
|
||||
expect_code=200):
|
||||
if msg_id is None:
|
||||
msg_id = "m%s" % (str(time.time()))
|
||||
if txn_id is None:
|
||||
txn_id = "m%s" % (str(time.time()))
|
||||
if body is None:
|
||||
body = "body_text_here"
|
||||
|
||||
path = "/rooms/%s/messages/%s/%s" % (room_id, sender_id, msg_id)
|
||||
path = "/rooms/%s/send/m.room.message/%s" % (room_id, txn_id)
|
||||
content = '{"msgtype":"m.text","body":"%s"}' % body
|
||||
if tok:
|
||||
path = path + "?access_token=%s" % tok
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue