I greatly simplified the PR, merged in:
https://github.com/discourse/discourse/commit/7caa28cf4555ba83abbf611b3f79a9e3248433af
I greatly simplified the PR, merged in:
https://github.com/discourse/discourse/commit/7caa28cf4555ba83abbf611b3f79a9e3248433af