I made a PR . Hopefully, the tests are good enough!
https://github.com/discourse/discourse/pull/26710