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) { async join(roomIdOrAlias) {
const {room_id} = await this._post(`/rooms/${roomId}/join`); const {room_id} = await this._post(`/join/${encodeURIComponent(roomIdOrAlias)}`);
return new RestRoom(this, room_id); return new RestRoom(this, room_id);
} }