HipChat Integration

Hi,

Just setup Discourse and was working on HipChat integration.

References:

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.

6 Likes

Sounds like a good change to me, I didn’t realise custom hipchat domains were possible when I created the integration.

Are you confident creating a pull request for the change? If not I’m happy to do it :slight_smile:

3 Likes

Hi @david

Thanks for reviewing this. I just created a pull request (my first!).
https://github.com/discourse/discourse-chat-integration/pull/18

Please review whenever you get the chance.

3 Likes

Is this all good now?

Sorry for the huge delay, I just merged this! :clinking_glasses:

2 Likes

This topic was automatically closed after 30 hours. New replies are no longer allowed.