forked from mystiq/hydrogen-web
name devices at login "Hydrogen"
so you can somewhat identify them in a device list
This commit is contained in:
parent
2c5c3ac8e2
commit
dea9fd90b4
2 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue