diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-18 17:11:08 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-18 17:11:08 +0200 |
commit | e5257b21b3cb6a1823159273b07a0ada25cdf8a8 (patch) | |
tree | aedb53fdf6c7c7ac1dc2443cbf29bb311262835d /webclient/components | |
parent | Update the default longpoll timeout time. (diff) | |
download | synapse-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.js | 10 |
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"; |