From 6aa4152e6eacf595b07f92576f441a4adbb09479 Mon Sep 17 00:00:00 2001 From: Piotr Kozimor Date: Wed, 6 Oct 2021 16:31:32 +0200 Subject: [PATCH] Return string sid instead of number in /requestToken --- clientapi/routing/threepid.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clientapi/routing/threepid.go b/clientapi/routing/threepid.go index 5104a4e4c..82f0d78c7 100644 --- a/clientapi/routing/threepid.go +++ b/clientapi/routing/threepid.go @@ -94,9 +94,10 @@ func RequestEmailToken(req *http.Request, accountDB accounts.Database, userAPI u util.GetLogger(req.Context()).WithError(err).Error("userAPI.CreateSession failed") return jsonerror.InternalServerError() } + resp.SID = strconv.Itoa(int(createSessionResp.Sid)) return util.JSONResponse{ Code: http.StatusOK, - JSON: createSessionResp, + JSON: resp, } } else { resp.SID, err = threepid.CreateSession(req.Context(), body, cfg)