Return string sid instead of number in /requestToken

This commit is contained in:
Piotr Kozimor 2021-10-06 16:31:32 +02:00
parent 433bc321ae
commit 6aa4152e6e

View file

@ -94,9 +94,10 @@ func RequestEmailToken(req *http.Request, accountDB accounts.Database, userAPI u
util.GetLogger(req.Context()).WithError(err).Error("userAPI.CreateSession failed") util.GetLogger(req.Context()).WithError(err).Error("userAPI.CreateSession failed")
return jsonerror.InternalServerError() return jsonerror.InternalServerError()
} }
resp.SID = strconv.Itoa(int(createSessionResp.Sid))
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusOK, Code: http.StatusOK,
JSON: createSessionResp, JSON: resp,
} }
} else { } else {
resp.SID, err = threepid.CreateSession(req.Context(), body, cfg) resp.SID, err = threepid.CreateSession(req.Context(), body, cfg)