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.
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.
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.
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.
It is now possible to use the HipChat.auth.withToken(...)
JS API from the configuration screen.
Open one or more files in the HipChat file viewer. See Javascript API for more details.
HipChat now supports Server Name Indication (SNI). This allows you to host add-ons and custom webhooks on services that use SNI, most notably:
Link to dialogs, sidebars and external pages from a Card title or other url
attributes in a card: Sending Messages
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.
Create and remove Glances at runtime. See Glances - Archived to learn more. Other extension types will be supported in February.
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 2HipChat.auth.withToken(function(err, token) { if (err) { // error } else { $.ajax({ type: 'GET', url: '/data', headers: { 'Authorization': 'JWT ' + token }, ... }); } });
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.
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.
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.
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.
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:
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" } ]
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" } ],
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: