Removed MessageRestServlet, use RoomSendEventRestServlet instead. Updated cmdclient, tests and webclient. All appears to work.

This commit is contained in:
Kegan Dougal 2014-08-26 17:21:48 +01:00
parent ad6d5ac06c
commit 5a93bfe1f0
6 changed files with 25 additions and 87 deletions

View file

@ -409,10 +409,9 @@ class SynapseCmd(cmd.Cmd):
def do_send(self, line):
"""Sends a message. "send <roomid> <body>" """
args = self._parse(line, ["roomid", "body"])
msg_id = "m%s" % int(time.time())
path = "/rooms/%s/messages/%s/%s" % (urllib.quote(args["roomid"]),
self._usr(),
msg_id)
txn_id = "txn%s" % int(time.time())
path = "/rooms/%s/send/m.room.message/%s" % (urllib.quote(args["roomid"]),
txn_id)
body_json = {
"msgtype": "m.text",
"body": args["body"]