From e21b0c231557c899467ebec9d9251788612b196a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Balzarotti?= Date: Mon, 17 Sep 2018 13:18:57 +0200 Subject: [PATCH] fixup --- src/repl.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/repl.jl b/src/repl.jl index c4c37aa..e56a68e 100644 --- a/src/repl.jl +++ b/src/repl.jl @@ -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