Thanks so much for all your work here @mcdanlj - this is now merged:
https://github.com/discourse/discourse-chat-integration/commit/da9106127afea45a72b8dcc8b944b8cbfc1b8fd1