-
Notifications
You must be signed in to change notification settings - Fork 27
Support for background colors in Hipchat messages #7
Comments
I'd very much like this ability. It's unfortunate how much Atlassian has been dragging on it. :\ |
I've prototyped this using the hipchat gem. Works well in my limited testing. Would be nice to somehow have the option to send a message as an API html message via some config option or extension. However, seems to me that unless the plugin author also sends HTML responses, I don't see much utility beyond changing background color. It seems as if the framework needs to provide the ability for plugin providers to send regular text and rich html messages as message replies and the adapter chooses the appropriate one for it. For example, the shell adapter would have no need for html output, but hipchat and others would. |
@josqu4red and I have discussed this before and imagined something similar to what you describe. The big open question is what the format for the rich text should be, since each chat service will have different capabilities and different syntax. If Lita were to provide a generic "rich text version of the message" mechanism, it would need to have some sort of markup format that would represent the lowest common denominator, and then each adapter would need to convert that format into their own chat service's syntax. The other possibility is that handlers directly target specific chat services so they know the formatting in advance, but this would require some degree of code duplication if a handler wanted to support rich text for more than one chat service. I'm not sure what the answer is at the moment, but it's definitely a desirable feature. |
The problem is that the lowest common denominator is basically nil :) take IRC colors and Slack's rich-formated messages. |
I've hijacked this thread....but :) For example
The message sent is a hash of context variables to use in a template, otherwise fall back to old behavior which is a text message Handler authors can provide response templates, but existing ones continue to work sending plain text |
Interesting idea! For the sake of not losing this discussion, would you mind opening an issue on the main Lita project? We can discuss further there without cluttering up this issue. |
So the templating is now available and works. But my html message just shows the markup. Has anyone worked out the format of a hipchat HTML message? |
@jimmycuadra Is it possible to send to Hipchat a HTML message with this templating feature? I've tried it with no luck. Anyone? |
So, Hipchat has the ability to have messages with alternate background colors (red, green, yellow, etc), which can be very helpful for quickly visually indicating message content. (See https://www.hipchat.com/docs/api/method/rooms/message for examples).
Via only XMPP, this is not currently possible. (See http://help.hipchat.com/forums/138883-suggestions-issues/suggestions/2974079-support-xhtml-im-send-text-only-notifications-to).
As an additional gotcha, when using HTML-formatted API-sent messages, Hipchat features such as
@mentions
don't work properly, so by default we wouldn't want to send only HTML-formatted messages.The text was updated successfully, but these errors were encountered: