aboutsummaryrefslogtreecommitdiff
path: root/ui/view-login.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-04-16 19:27:35 +0300
committerTulir Asokan <tulir@maunium.net>2020-04-19 15:01:16 +0300
commit815190be147e575f12211c468f8121e5c60e6337 (patch)
tree8abd9b3d3952dbf767ca369ddad400db8a6f2d45 /ui/view-login.go
parentff20c2c44f86b40f9214f1dc3d339584e48374f1 (diff)
Update stuff and move pushrules to mautrix-go
Diffstat (limited to 'ui/view-login.go')
-rw-r--r--ui/view-login.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/view-login.go b/ui/view-login.go
index 9eb8226..d1cd4ee 100644
--- a/ui/view-login.go
+++ b/ui/view-login.go
@@ -19,6 +19,7 @@ package ui
import (
"math"
+ "maunium.net/go/mautrix/id"
"maunium.net/go/tcell"
"maunium.net/go/mautrix"
@@ -75,7 +76,7 @@ func (ui *GomuksUI) NewLoginView() mauview.Component {
hs := ui.gmx.Config().HS
view.homeserver.SetPlaceholder("https://example.com").SetText(hs)
- view.username.SetPlaceholder("@user:example.com").SetText(ui.gmx.Config().UserID)
+ view.username.SetPlaceholder("@user:example.com").SetText(string(ui.gmx.Config().UserID))
view.password.SetPlaceholder("correct horse battery staple").SetMaskCharacter('*')
view.quitButton.SetOnClick(func() { ui.gmx.Stop(true) }).SetBackgroundColor(tcell.ColorDarkCyan)
@@ -103,7 +104,7 @@ func (ui *GomuksUI) NewLoginView() mauview.Component {
}
func (view *LoginView) resolveWellKnown() {
- _, homeserver, err := mautrix.ParseUserID(view.username.GetText())
+ _, homeserver, err := id.UserID(view.username.GetText()).Parse()
if err != nil {
return
}