Hi,
Just setup Discourse and was working on HipChat integration.
References:
- Chatroom Integration Plugin (discourse-chat-integration)
- Set up HipChat notifications using the discourse-chat-integration plugin
Our HipChat setup uses a URL of the format: hipchat.xyzcompany.com
. When setting up the HipChat Channel (Plugins>Chat Integrations>HipChat>Add Channel), the Webhook URL does not support the format: hipchat.xyzcompany.com
. It expects hipchat.com
and so marks entries like hipchat.xyzcompany.com
as invalid.
On looking up the code in:
/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/hipchat
I see that the match is looking for hipchat.com
as show below:
module DiscourseChat
module Provider
module HipchatProvider
PROVIDER_NAME = "hipchat".freeze
PROVIDER_ENABLED_SETTING = :chat_integration_hipchat_enabled
CHANNEL_PARAMETERS = [
{ key: "name", regex: '^\S+' },
{ key: "webhook_url", regex: 'hipchat\.com'', unique: true, hidden: true },
{ key: "color", regex: '^(yellow|green|red|purple|gray|random)$' }
]
I believe this is a BUG and it should be able to address URLs such as hipchat.xyzcompany.com
.
To test this out I went ahead and tried changing the code and restarted the app. On restart I was able to add hipchat.xyzcompany.com
successfully.
Do let me know if you need any information.