summary refs log tree commit diff
path: root/cmdclient
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-26 10:37:31 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-26 10:37:31 +0100
commitf6daa9f1703d0f924dc2c519151b841def4a051b (patch)
treefeebb74986533487afe19e91f3e52437d3fd1fad /cmdclient
parentAdd 'state_key' to valid_keys (diff)
parentURL renaming: Room state keys now use the format /rooms/$roomid/state/$event_... (diff)
downloadsynapse-f6daa9f1703d0f924dc2c519151b841def4a051b.tar.xz
Merge branch 'client_server_url_rename' into develop
Diffstat (limited to 'cmdclient')
-rwxr-xr-xcmdclient/console.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/cmdclient/console.py b/cmdclient/console.py
index 64557a4c40..0fbb822010 100755
--- a/cmdclient/console.py
+++ b/cmdclient/console.py
@@ -61,7 +61,7 @@ class SynapseCmd(cmd.Cmd):
             "send_delivery_receipts": "on"
         }
         self.path_prefix = "/matrix/client/api/v1"
-        self.event_stream_token = "START"
+        self.event_stream_token = "END"
         self.prompt = ">>> "
 
     def do_EOF(self, line):  # allows CTRL+D quitting
@@ -402,9 +402,7 @@ class SynapseCmd(cmd.Cmd):
         """Leaves a room: "leave <roomid>" """
         try:
             args = self._parse(line, ["roomid"], force_keys=True)
-            path = ("/rooms/%s/members/%s/state" %
-                    (urllib.quote(args["roomid"]), self._usr()))
-            reactor.callFromThread(self._run_and_pprint, "DELETE", path)
+            self._do_membership_change(args["roomid"], "leave", self._usr())
         except Exception as e:
             print e
 
@@ -567,7 +565,7 @@ class SynapseCmd(cmd.Cmd):
                                alt_text="Sent receipt for %s" % event["msg_id"])
 
     def _do_membership_change(self, roomid, membership, userid):
-        path = "/rooms/%s/members/%s/state" % (urllib.quote(roomid), userid)
+        path = "/rooms/%s/state/m.room.member/%s" % (urllib.quote(roomid), urllib.quote(userid))
         data = {
             "membership": membership
         }