Last updated Dec 8, 2017

Latest updates

The new UI extension points are still under development, and as we are working towards the Beta release, there will be the occasional breaking change that you will need to adopt. This page documents what's coming, what's been released and what you need to do in order to keep your integration up-to-date.

What's Coming?

Auto-Update

Automatic update for add-ons listed on Marketplace: Create a new version of you add-on listing on marketplace.atlassian.com and we will take care of updating all existing installations.

Whats New

Released April 2016

Signed URLs for iframes are now optional (April 19)

It is now possible to opt out of signed URLs for web panels and dialogs. This allows you to improve the load time of your iframe by taking full advantage of HTTP caching (only possible now because the URL remains stable). Opt out by adding an "authentication": "none" attribute to your module:

1
2
"webPanel": [
  {
    "key": "fast-loading-panel",
    "authentication": "none",
    ...
}

In the iframe content, you can later use HipChat.auth.withToken(...) to get a JWT for accessing your backend API.

Note: This feature can be used in the descriptor today, but the HipChat apps will only start to honor it at the beginning of May.

Versioning (April 18, 2016)

HipChat Connect has introduced better support for API versioning. See HipChat Connect Versioning for more information on how to make use of it in your plugin.

Configuration Screen JS API enhancements (April 18, 2016)

It is now possible to use the HipChat.auth.withToken(...) JS API from the configuration screen.

File Viewer JS API (April 8)

Open one or more files in the HipChat file viewer. See Javascript API for more details.

Released March 2016

SNI Support (Mar 1, 2016)

HipChat now supports Server Name Indication (SNI). This allows you to host add-ons and custom webhooks on services that use SNI, most notably:

Released February 2016

HipChat Native URL scheme with support for module targets (Feb 15, 2016)

Link to dialogs, sidebars and external pages from a Card title or other url attributes in a card: Sending Messages

Extension REST API (Feb 5, 2016)

Create and remove glances, actions, sidebars, dialogs, external pages and webhooks at runtime through our new API:

Rooms: devvm.hipchat.com/docs/apiv2/method/create_room_glance et al.

Global: devvm.hipchat.com/docs/apiv2/method/create_global_glance et al.

Released January 2016

Glance REST API

Create and remove Glances at runtime. See Glances - Archived to learn more. Other extension types will be supported in February.

New JS token API to authenticate add-on iframe to add-on backend calls

No need to worry about creating tokens for AJAX calls from your iframe to your backend anymore! Just call the new withToken API and reuse the existing JWT auth logic in your backend:

1
2
HipChat.auth.withToken(function(err, token) {
  if (err) {
    // error
  } else {
    $.ajax({
      type: 'GET',
      url: '/data',
      headers: { 'Authorization': 'JWT ' + token },
      ...
    });
  }
});

New JS API to retrieve room and user information in the HipChat UI

Get information about the currently logged in user, the users in the rooms or the room details, all through the JavaScript API! Learn how: Javascript API

You can now include links to other rooms or 1:1 chats in HTML notifications and cards by using the HipChat Custom URL scheme. You can even open the target room with your particular sidebar opened, by using the same data-target and data-target-options attributes we already support for links to add-on components in cards and notifications.

Released December 2015

Preserve the OAuth ID across add-on re-installs

Wanted to use the OAuth ID as a stable ID to identify an add-on installation? Frustrated about losing all user-approved 3LO tokens after a re-install? You can now opt-in to stable OAuth IDs by using the new add-on lifecycle endpoints for updates. See Server-side installation and Client-side installation for details.

Released October 2015

Add-on Avatars (Oct 14, 2015)

Addons may now specify an avatar they wish to be used in chat for all notifications that are sent by their addon. To add an avatar you will need to modify your addon descriptor as follows:

1
2
"capabilities": {
  "hipchatApiConsumer": {
    ...
    "avatar": "{{localBaseUrl}}/avatar.png",
    ...
  },

You will then need to reinstall the integration to pick up the changed descriptor. This feature is only currently available in groups with the HipChat Connect alpha/beta enabled.

Breaking Changes

Released September 2015

Changes to actions and dialogs (Sept 17, 2015)

Opening dialogs and sidebars from message and input actions was inconsistent and hard to understand. The same is true for opening dialogs from JavaScript API. We want to simplify the experience and introduce a new module type dialog that you declare in the descriptor.

How do I know if I need to change anything?

If you were opening sidebars or dialogs from a message action, input action or from JavaScript, you will need to make the changes below. Symptoms are:

  • My dialog now opens in a sidebar
  • My dialog doesn't open at all
  • My dialog layout looks broken: Dialog contents are not rendered with a margin anymore, you will need to specify the desired padding yourself.
  • My submit action is called even if I cancel the dialog
Opening a dialog from an action

Split the existing action into a dialog module and an action module, where the action just references the dialog:

Before

1
2
"action": [
  {
    "key": "message.note.create",
    "name": {
      "value": "Convert to Note"
    },
    "target": {
      "type": "dialog",
      "options": {
        "title": "Add New Note"
      }
    },
    "location": "hipchat.message.action",
    "url": "{{localBaseUrl}}/new-note"
  }
]

After

1
2
"dialog": [
  {
    "key": "notes.dialog.create",
    "title": {
      "value": "Add New Note"
    },
    "url": "{{localBaseUrl}}/new-note"
  }
],
"action": [
  {
    "key": "message.note.create",
    "name": {
      "value": "Convert to Note"
    },
    "target": "notes.dialog.create",
    "location": "hipchat.message.action"
  }
]
Opening a sidebar from an action

The action can now just simply reference the web panel, with no need to define a url or a target type in the action:

Before

1
2
"action": [
  {
    "key": "message.send.to.addon",
    "name": {
      "value": "Send this message to addon"
    },
    "target": {
      "key": "hctester.sidebar.message-actions",
      "type": "sidebar"
    },
    "location": "hipchat.message.action",
    "url": "{{localBaseUrl}}/sidebar/message-actions"
  }
],

After

1
2
"action": [
  {
    "key": "message.send.to.addon",
    "name": {
      "value": "Send this message to addon"
    },
    "target": "hctester.sidebar.message-actions",
    "location": "hipchat.message.action"
  }
],
Opening a dialog from JavaScript

Dialog API can now modify any dialog option:

Before:

1
2
// Opening a dialog without options
dialog.open({
  key: "webpanel-key"
});
 
// Opening a dialog with options
dialog.open({
  key: "webpanel-key",
  title: "Title",
  hint: "Some hint",
  button: "OK"
});
 
// Updating the title
dialog.setTitle("New title");
 
// Updating the hint
dialog.setHint("New hint");
 
// Updating the button text
dialog.setButtonText("Yes");

After:

Generally, you should declare the dialogs in the descriptor and just open them by specifying the key. It is still possible to customize the dialog, however:

1
2
// Opening a dialog without options
dialog.open({
  key: "dialog-key"
});
 
// Opening a dialog with options
var dialogOptions = {
  title: "My Dialog",
  options: {
    primaryAction: {
      name: "OK"
    },
    hint: "Some hint"
  }
};
dialog.open({
  key: "dialog-key",
  options: dialogOptions
});
 
// Updating the title
dialog.update({
  title: "New title"
 
});
 
// Updating the hint
dialog.update({
  options: {
    hint: "New hint"
  }
});
 
// Updating the button text - option 1 (convenience method)
dialog.updatePrimaryAction({
  name: "OK"
});
 
// Updating the button text - option 2
dialog.update({
  options: {
    primaryAction: {
      name: "OK"
    }
  }
});
 
// Any other dialog attributes can be updated the same way

Rate this page: