Don't double-wrap error

This commit is contained in:
Neil Alexander 2021-11-09 10:44:31 +00:00
parent 858b7c5e6f
commit 0f7e897a0c
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -81,7 +81,7 @@ func JoinRoomByIDOrAlias(
defer close(done)
rsAPI.PerformJoin(req.Context(), &joinReq, &joinRes)
if joinRes.Error != nil {
joinRes.Error.Code = roomserverAPI.PerformErrorNotAllowed
joinRes.Error.RemoteCode = http.StatusForbidden
done <- joinRes.Error.JSONResponse()
} else {
done <- util.JSONResponse{