aboutsummaryrefslogtreecommitdiff
path: root/matrix/matrix.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-07-24 21:47:22 +0300
committerTulir Asokan <tulir@maunium.net>2020-07-24 21:47:22 +0300
commit77a1514c900a0d422a616a548496a48cf6baf35f (patch)
treeda882d048c74e7e7e922216fc753a4eb2eaa84f3 /matrix/matrix.go
parentecdd4f08cb262c8f0c988209e6296c068e1d4cf3 (diff)
Add device list and legacy verification commands
Diffstat (limited to 'matrix/matrix.go')
-rw-r--r--matrix/matrix.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index b07fa82..f7f308b 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -162,6 +162,8 @@ func (c *Container) PasswordLogin(user, password string) error {
},
Password: password,
InitialDeviceDisplayName: "gomuks",
+
+ StoreCredentials: true,
})
if err != nil {
return err
@@ -171,8 +173,6 @@ func (c *Container) PasswordLogin(user, password string) error {
}
func (c *Container) finishLogin(resp *mautrix.RespLogin) {
- c.client.SetCredentials(resp.UserID, resp.AccessToken)
- c.client.DeviceID = resp.DeviceID
c.config.UserID = resp.UserID
c.config.DeviceID = resp.DeviceID
c.config.AccessToken = resp.AccessToken
@@ -218,6 +218,8 @@ func (c *Container) SingleSignOn() error {
Type: "m.login.token",
Token: loginToken,
InitialDeviceDisplayName: "gomuks",
+
+ StoreCredentials: true,
})
if err != nil {
respondHTML(w, http.StatusForbidden, err.Error())