This commit is contained in:
Nicolò Balzarotti 2018-09-17 13:18:57 +02:00
parent c9db66f0f9
commit e21b0c2315
1 changed files with 4 additions and 5 deletions

View File

@ -789,11 +789,10 @@ function load_secret_or_login(config; secretfile = expanduser("~/matrix/secret.j
(1:password.size).-1),""))
write(secretfile, response.body |> String)
end
let sec = JSON.parse(open(secretfile, "r"))
@info "Session loaded from secret"
token = sec["access_token"]
deviceid = sec["device_id"]
end
sec = JSON.parse(open(secretfile, "r"))
@info "Session loaded from secret"
token = sec["access_token"]
deviceid = sec["device_id"]
(server, username, token, deviceid)
end