diff --git a/corporal/connector/synapse.go b/corporal/connector/synapse.go index d077670..2301efe 100644 --- a/corporal/connector/synapse.go +++ b/corporal/connector/synapse.go @@ -1,9 +1,8 @@ package connector import ( - "devture-matrix-corporal/corporal/matrix" - "devture-matrix-corporal/corporal/util" "fmt" + "net/url" "sync" "time" @@ -11,6 +10,9 @@ import ( "crypto/sha1" "github.com/matrix-org/gomatrix" + + "devture-matrix-corporal/corporal/matrix" + "devture-matrix-corporal/corporal/util" ) const ( @@ -110,7 +112,7 @@ func (me *SynapseConnector) ObtainNewAccessTokenForUserId(userId, deviceId strin var response matrix.ApiAdminResponseUserLogin err = client.MakeRequest( "POST", - buildPrefixlessURL(client, fmt.Sprintf("/_synapse/admin/v1/users/%s/login", userId), map[string]string{}), + buildPrefixlessURL(client, fmt.Sprintf("/_synapse/admin/v1/users/%s/login", url.QueryEscape(userId)), map[string]string{}), requestPayload, &response, )