diff --git a/src/matrix/SessionContainer.js b/src/matrix/SessionContainer.js index 7917baf4..9b64115f 100644 --- a/src/matrix/SessionContainer.js +++ b/src/matrix/SessionContainer.js @@ -89,7 +89,7 @@ export class SessionContainer { let sessionInfo; try { const hsApi = new HomeServerApi({homeServer, request: this._request, createTimeout: this._clock.createTimeout}); - const loginData = await hsApi.passwordLogin(username, password).response(); + const loginData = await hsApi.passwordLogin(username, password, "Hydrogen").response(); const sessionId = this.createNewSessionId(); sessionInfo = { id: sessionId, diff --git a/src/matrix/net/HomeServerApi.js b/src/matrix/net/HomeServerApi.js index b1a89634..649a7462 100644 --- a/src/matrix/net/HomeServerApi.js +++ b/src/matrix/net/HomeServerApi.js @@ -141,14 +141,15 @@ export class HomeServerApi { {}, {}, options); } - passwordLogin(username, password, options = null) { + passwordLogin(username, password, initialDeviceDisplayName, options = null) { return this._post("/login", null, { "type": "m.login.password", "identifier": { "type": "m.id.user", "user": username }, - "password": password + "password": password, + "initial_device_display_name": initialDeviceDisplayName }, options); }