From ff20bc783dc77e61ad21d024fe72c09be6ae2323 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Sep 2018 18:30:17 +0200 Subject: [PATCH] support joining with a room alias for rest session --- src/rest/session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest/session.js b/src/rest/session.js index 44be15c3ff..846e83cc84 100644 --- a/src/rest/session.js +++ b/src/rest/session.js @@ -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); }