mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 04:24:56 -04:00
Support room alias in rooms URL (ex: http://127.0.0.1:8000/#/room/#public:localhost:8080)
This commit is contained in:
parent
b37ced8f63
commit
e5257b21b3
3 changed files with 58 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue