aboutsummaryrefslogtreecommitdiff
path: root/mxlib
diff options
context:
space:
mode:
Diffstat (limited to 'mxlib')
-rw-r--r--mxlib/api.go7
-rw-r--r--mxlib/client.go3
2 files changed, 9 insertions, 1 deletions
diff --git a/mxlib/api.go b/mxlib/api.go
index 6d35108..9cd02d5 100644
--- a/mxlib/api.go
+++ b/mxlib/api.go
@@ -40,7 +40,12 @@ type LoginResponse struct {
}
type RegisterRequest struct {
- Username string `json:"username"`
+ Auth RegisterRequestAuth `json:"auth"`
+ Username string `json:"username"`
+}
+
+type RegisterRequestAuth struct {
+ Type string `json:"type"`
}
type RegisterResponse struct {
diff --git a/mxlib/client.go b/mxlib/client.go
index c111360..689d3a0 100644
--- a/mxlib/client.go
+++ b/mxlib/client.go
@@ -144,6 +144,9 @@ func (mx *Client) PasswordLogin(username string, password string, device_id stri
func (mx *Client) RegisterUser(username string) error {
req := RegisterRequest{
+ Auth: RegisterRequestAuth{
+ Type: "m.login.application_service",
+ },
Username: username,
}
var rep RegisterResponse