Skip to content

Instantly share code, notes, and snippets.

@bobfrankly
Created December 1, 2017 18:15
Show Gist options
  • Save bobfrankly/367828f99ea59408f7e2226038f2ade1 to your computer and use it in GitHub Desktop.
Save bobfrankly/367828f99ea59408f7e2226038f2ade1 to your computer and use it in GitHub Desktop.
sendMessage: function (clientInfo, roomId, msg, opts, card){
opts = (opts && opts.options) || {};
return request(clientInfo, {
method: 'POST',
resource: '/room/' + roomId + '/notification',
body: {
message: msg,
message_format: (opts.format ? opts.format : 'html'),
color: (opts.color ? opts.color : 'yellow'),
notify: (opts.notify ? opts.notify : false),
card: card
}
});
},
// How do I reference the color in line 9?
hipchat.sendMessage(req.clientInfo, req.identity.roomId, "The color of the pen is red", (color = 'green'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment