Add type: m.login.application_service to register call
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Alex 2021-06-01 23:26:15 +02:00
parent 78b4037410
commit adf163bad5
No known key found for this signature in database
GPG Key ID: EDABF9711E244EB1
3 changed files with 16 additions and 1 deletions

7
.drone.yml Normal file
View File

@ -0,0 +1,7 @@
pipeline:
build:
image: golang:stretch
commands:
- go get -d -v
- go build -v

View File

@ -40,9 +40,14 @@ type LoginResponse struct {
}
type RegisterRequest struct {
Auth RegisterRequestAuth `json:"auth"`
Username string `json:"username"`
}
type RegisterRequestAuth struct {
Type string `json:"type"`
}
type RegisterResponse struct {
UserId string `json:"user_id"`
AccessToken string `json:"access_token"`

View File

@ -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