This feature has been merged:
https://github.com/discourse/discourse/commit/7e9afdace33788a26d17e251d04f63d438f6c3f1