support setting the display name on rest session

pull/21833/head
Bruno Windels 2018-09-11 14:54:14 +02:00
parent afc678fea0
commit 3c5e73d644
1 changed files with 6 additions and 1 deletions

View File

@ -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,