Opening Dialog through card

hipchat
dialog
rest-api

#1

Hi,
We are trying to open a dialog from a card in HipChat. According to this documentation [https://developer.atlassian.com/server/hipchat/messages/] you should be able to do this using “data-target” in the “a” tag. But we do not appear to be able to open dialogs by setting this attribute. Nothing happens when we press the link containing the attribute and the link to the dialog.

We also tried just posting the link as a regular message in HipChat through the REST API. But it is still the same behavior, with nothing happening upon pressing “Open Dialog”. This is what is posted to the room:

<a href="https://LinkToDialog.html" target="sample.dialog">Open Dialog</a>

We are however able to open the same dialog through Actions, so there appears to be no problems with the dialog itself. The key of the dialog is “sample.dialog”.

Have anyone else experienced the same behavior or have any thoughts of what is going wrong?


#2

target is different than data-target I assume. Can you try this?

<a href="https://LinkToDialog.html" data-target="sample.dialog">Open Dialog</a>

#3

Hi @rwhitbeck,
Thanks for spotting that! It’s a copy mistake from my side… We initially used data-target like you describe above. Then when it didn’t work we started playing around with the attributes to see if that would make any difference, and that is what I manged to copy into this post…
So yeah if we use
<a href="https://LinkToDialog.html" data-target="sample.dialog">Open Dialog</a>
we get the result described above, with nothing happening upon pressing the link. If we remove “data-target” altogether the dialog’s html page is opened in another browser window. Which is what you would expect.