summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-18 17:11:08 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-18 17:11:08 +0200
commite5257b21b3cb6a1823159273b07a0ada25cdf8a8 (patch)
treeaedb53fdf6c7c7ac1dc2443cbf29bb311262835d /webclient/components
parentUpdate the default longpoll timeout time. (diff)
downloadsynapse-e5257b21b3cb6a1823159273b07a0ada25cdf8a8.tar.xz
Support room alias in rooms URL (ex: http://127.0.0.1:8000/#/room/#public:localhost:8080)
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/matrix-service.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/webclient/components/matrix/matrix-service.js b/webclient/components/matrix/matrix-service.js
index c52c94c310..47828993a1 100644
--- a/webclient/components/matrix/matrix-service.js
+++ b/webclient/components/matrix/matrix-service.js
@@ -165,6 +165,16 @@ angular.module('matrixService', [])
             return doRequest("DELETE", path, undefined, undefined);
         },
 
+        // Retrieves the room ID corresponding to a room alias
+        resolveRoomAlias:function(room_alias) {
+            var path = "/matrix/client/api/v1/ds/room/$room_alias";
+            room_alias = encodeURIComponent(room_alias);
+
+            path = path.replace("$room_alias", room_alias);
+
+            return doRequest("GET", path, undefined, {});
+        },
+
         sendMessage: function(room_id, msg_id, content) {
             // The REST path spec
             var path = "/rooms/$room_id/messages/$from/$msg_id";