mirror of https://github.com/matrix-org/gomatrix
Add missing User-Interactive fields. Only add access_token if one was given.
This commit is contained in:
parent
4517ecd6ed
commit
831dfd27a6
|
@ -75,7 +75,9 @@ func (cli *Client) BuildBaseURL(urlPath ...string) string {
|
||||||
parts = append(parts, urlPath...)
|
parts = append(parts, urlPath...)
|
||||||
hsURL.Path = path.Join(parts...)
|
hsURL.Path = path.Join(parts...)
|
||||||
query := hsURL.Query()
|
query := hsURL.Query()
|
||||||
query.Set("access_token", cli.AccessToken)
|
if cli.AccessToken != "" {
|
||||||
|
query.Set("access_token", cli.AccessToken)
|
||||||
|
}
|
||||||
hsURL.RawQuery = query.Encode()
|
hsURL.RawQuery = query.Encode()
|
||||||
return hsURL.String()
|
return hsURL.String()
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,11 @@ type RespUserInteractive struct {
|
||||||
Flows []struct {
|
Flows []struct {
|
||||||
Stages []string `json:"stages"`
|
Stages []string `json:"stages"`
|
||||||
} `json:"flows"`
|
} `json:"flows"`
|
||||||
Params map[string]interface{} `json:"params"`
|
Params map[string]interface{} `json:"params"`
|
||||||
Session string `json:"string"`
|
Session string `json:"string"`
|
||||||
|
Completed []string `json:"completed"`
|
||||||
|
ErrCode string `json:"errcode"`
|
||||||
|
Error string `json:"error"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RespRegister is the JSON response for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-register
|
// RespRegister is the JSON response for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-register
|
||||||
|
|
Loading…
Reference in New Issue