Hip Chat Notification

in Hip Chat notification any url i send in anchor tag with property "target='_blank' ", Hip Chat does not receive target property. Is there any alternative so that any url when i click open in new tab. Please help me for this.... Thanks

4 answers

This widget could not be displayed.

Hi Manoj - I'm not sure exactly what you mean. Are you sending a message through the API? All URLs in HipChat should open in new browser tabs automatically (whether you're using the desktop client or the web client). There should be no need to specifically add "target='_blank'" to provide that behavior.

This widget could not be displayed.

Hi Chrostopher, first of all many thanks for your reply. Actually i am using the HipChat Api to send message to hipchat. The message is in html tags and this message contains anchor tag something like :

<a href="www.google.com"> Click Here </a>

In web client when I click on this link it gets open in same tab not new one(In chrome) . So please help me out for this one.

Thanks

This widget could not be displayed.

A couple things:

1: You want to make sure that you're using the /room/<room-id>/notification API - the /room/message API doesn't allow for sending HTML, only plain text

2: The URL in your href attribute should include the scheme (e.g. https://www.google.com instead of just www.google.com)

Following those rules, I tried this with a test account and the resulting message link automatically opened up in a new browser (in Chrome):

image2017-1-9 17:47:22.png

The arguments I used for that message, for reference:

{
    "color": "red",
    "message_format": "html",
    "notify": "false",
    "message": "Hey - I'm an API message... &lt;a href='https://www.google.com'&gt;click here&lt;/a&gt;"
}
This widget could not be displayed.

Hey Christopher,

Thanks again buddy for reply. Yes you are right, the url I had was just for comment. My complete anchor tag looks like this:

<a href="http://fake.link?from=2015-11-20T17%3A35%3A15Z&amp;until=2015-11-20T19%3A35%3A15Z"> View All Anomaly Events </a>

 

Screenshot from 2017-01-10 10-45-17.png

Now when i click the link, its opening in same tab. I want it to be opened in new one. Please correct me if I am doing any kind of mistake also guide me how I should achieve this functionality.

It looks like you're doing everything correctly, given you have custom text for your link. My guess is that you either have a browser setting preventing the link from opening in a new page or there's a bug in the display code for the web client. I would suggest sending an email to support@hipchat.com referencing this post and they can help you out with your specific situation.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 10, 2018 in Hipchat

What should I think about when migrating HipChat to Slack?

...from the beginning. We have built up a lot of content in HipChat, with it being a core tool in our distributed company model. While it is true that we didn’t need to move to Slack immediately, we felt it...

416 views 1 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you