1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-20 16:22:28 +03:00

support joining with a room alias for rest session

This commit is contained in:
Bruno Windels
2018-09-11 18:30:17 +02:00
parent 2be413ba6d
commit ff20bc783d

View File

@@ -37,8 +37,8 @@ module.exports = class RestSession {
});
}
async join(roomId) {
const {room_id} = await this._post(`/rooms/${roomId}/join`);
async join(roomIdOrAlias) {
const {room_id} = await this._post(`/join/${encodeURIComponent(roomIdOrAlias)}`);
return new RestRoom(this, room_id);
}