1
0
Fork 0
mirror of https://github.com/matrix-org/gomatrix synced 2025-05-12 10:41:44 +00:00

Add missing User-Interactive fields. Only add access_token if one was given.

This commit is contained in:
Kegan Dougal 2016-12-02 17:02:25 +00:00
parent 4517ecd6ed
commit 831dfd27a6
2 changed files with 8 additions and 3 deletions

View file

@ -75,7 +75,9 @@ func (cli *Client) BuildBaseURL(urlPath ...string) string {
parts = append(parts, urlPath...)
hsURL.Path = path.Join(parts...)
query := hsURL.Query()
query.Set("access_token", cli.AccessToken)
if cli.AccessToken != "" {
query.Set("access_token", cli.AccessToken)
}
hsURL.RawQuery = query.Encode()
return hsURL.String()
}