From 3c5e73d64414e69a46cf1624c4cb91254570a2e5 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Sep 2018 14:54:14 +0200 Subject: [PATCH] support setting the display name on rest session --- src/rest/session.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rest/session.js b/src/rest/session.js index f57d0467f5..caa10a430b 100644 --- a/src/rest/session.js +++ b/src/rest/session.js @@ -57,12 +57,17 @@ module.exports = class RestSession { } } + async setDisplayName(displayName) { + await this._put(`/profile/${this.credentials.userId}/displayname`, { + displayname: displayName + }); + } + async join(roomId) { const {room_id} = await this._post(`/rooms/${roomId}/join`); return new RestRoom(this, room_id); } - async createRoom(name, options) { const body = { name,