Hip Chat Notification

Manoj Sharma January 1, 2017

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

0 votes
Manoj Sharma January 9, 2017

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.

crivers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 10, 2017

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.

0 votes
crivers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 9, 2017

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;"
}
0 votes
Manoj Sharma January 8, 2017

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

0 votes
crivers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 3, 2017

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events