aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-02-19 22:12:12 +0200
committerTulir Asokan <tulir@maunium.net>2020-02-19 22:12:12 +0200
commit8e33beeee7bb288074d065aff8a53a12ed7c2d6e (patch)
treeb0d6e245ae507118c187b15a1a5314159310bfa4
parent15e1d3f87c5e18f3429c49d21b30e66fb2a9cff7 (diff)
Don't ignore history init errors
-rw-r--r--ui/view-login.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/view-login.go b/ui/view-login.go
index 023aaad..00b473d 100644
--- a/ui/view-login.go
+++ b/ui/view-login.go
@@ -118,7 +118,11 @@ func (view *LoginView) actuallyLogin(hs, mxid, password string) {
debug.Printf("Logging into %s as %s...", hs, mxid)
view.config.HS = hs
err := view.matrix.InitClient()
- debug.Print("Init error:", err)
+ if err != nil {
+ debug.Print("Init error:", err)
+ view.Error(err.Error())
+ return
+ }
err = view.matrix.Login(mxid, password)
if err != nil {
if httpErr, ok := err.(mautrix.HTTPError); ok {