summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-08-27 11:19:37 +0100
committerMark Haines <mark.haines@matrix.org>2014-08-27 11:19:37 +0100
commitbf05218c4b1740cdc5477cadbc36f0575e2dcd51 (patch)
treeced8ed09e18afb11e97734959150b8ef7f0db833 /webclient
parentFold federation/handler into handlers/federation (diff)
parentAdded support for GET /events/$eventid with auth checks. (diff)
downloadsynapse-bf05218c4b1740cdc5477cadbc36f0575e2dcd51.tar.xz
Merge branch 'develop' into storage_transactions
Diffstat (limited to 'webclient')
-rw-r--r--webclient/components/matrix/matrix-service.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/webclient/components/matrix/matrix-service.js b/webclient/components/matrix/matrix-service.js
index fe5f120aaf..2286485605 100644
--- a/webclient/components/matrix/matrix-service.js
+++ b/webclient/components/matrix/matrix-service.js
@@ -162,12 +162,12 @@ angular.module('matrixService', [])
             return doRequest("GET", path, undefined, {});
         },
 
-        sendMessage: function(room_id, msg_id, content) {
+        sendMessage: function(room_id, txn_id, content) {
             // The REST path spec
-            var path = "/rooms/$room_id/messages/$from/$msg_id";
+            var path = "/rooms/$room_id/send/m.room.message/$txn_id";
 
-            if (!msg_id) {
-                msg_id = "m" + new Date().getTime();
+            if (!txn_id) {
+                txn_id = "m" + new Date().getTime();
             }
 
             // Like the cmd client, escape room ids
@@ -175,8 +175,7 @@ angular.module('matrixService', [])
 
             // Customize it
             path = path.replace("$room_id", room_id);
-            path = path.replace("$from", config.user_id);
-            path = path.replace("$msg_id", msg_id);
+            path = path.replace("$txn_id", txn_id);
 
             return doRequest("PUT", path, undefined, content);
         },