How can I send hipchat room an alias command

I have an alias setup in a test room

/alias set @kftest <some set of users>

that works fine.  What I want to do is use a curl command or send some json body in a command to that HipChat room so that the alias is triggered.

Simple things like:

curl -d '{"message": "@kftest from desktop", "notify": false, "messageformat": "html"}' -H 'Content-Type: application/json' <my room location and auth token> 

only repeat the message 

Its not obvious by looking at if there is a setting.  I tried using "mentions" : "mention_name" : @kftest  

with no luck.  Any ideas?

1 answer

0 vote

If you set message_format to "text" instead of "html", the Alias trigger should work. HTML-based messages don't trigger normal parsing, which causes addons like Alias to not pick up @-mentions

That did not work either.

curl -d '{"message": "@kftest from desktop", "notify": false, "messageformat": "text"}' -H 'Content-Type: application/json' <my room location and auth token> 

produces the same result

I noticed that I should have used "message_format" instead of "messageformat" but this didn't help.  Trying

curl -d '{"message": "@kftest Notification from Desktop", "notify": false, "message_format": "text"}' -H 'Content-Type: application/json' <my room location and auth token> got back :

@kftest Notification from Desktop

but didn't actually trigger the alias.  Any other ideas

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Published Oct 07, 2017 in Hipchat

Bringing Structure to your HipChat Instance

...have mention name FirstnameLastname. Fe.: @MaartenCautreels This certainly helps to know who is being mentioned in a conversation. Imagine your colleague sends the following message...

456 views 1 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot