-
Notifications
You must be signed in to change notification settings - Fork 182
Enable rich (html) messages #66
Comments
Very interesting idea. Would you be interested in prototyping it as a plugin? |
pretty swamped right now so can't estimate when I'd get to it, but I'll put it on my todo list. |
This is released in Lita 4.2! Thanks for helping figure out how to get this feature in! |
great, can't wait to try it out. |
I'm trying this out using the slack adapter but can't seem to get this working..
Any tips would be appreciated... |
Slack doesn't use HTML in messages, it uses a Markdown-style format: https://slack.zendesk.com/hc/en-us/articles/202288908-Formatting-your-messages |
I feel quite stupid now...
Any suggestions on what I'm doing wrong ? |
What is the expected output and what are you seeing instead? |
The output now is:
But I would like to see the following: • puppet-alternatives: pull request #1 - fix: insync function comparing current and should items - by vladnazarenko I think I'm using the correct syntax for links in Slack but any help would be appreciated. |
Would you mind opening a separate issue on lita-slack? I don't wanna lose track of this! |
No problem. |
sparked from the conversation at litaio/lita-hipchat#7.
To allow plugins to provide adapter specific rich formatted messages we can borrow the Rails pattern for view templates.
The plugin can provide templates that follow the pattern: HANDLER.ROUTE.ADAPTER.erb, where:
HANDLER = registered handler class name
ROUTE = the method symbol passed to #route
ADAPTER = the adapter name (hipchat, slack, shell, etc)
For example, the lita-jira plugin can provide hipchat and slack specific templates like so:
If the argument sent to
Response#reply
is a hash, it's the context variables to use in a template, otherwise fall back to old behavior which is a text messageIf the adapter being used doesn't have a template, then the hash should provide a fallback message string which would be the same message string that's passed now.
This would allow plugin authors to provide rich response templates, but existing ones continue to work sending plain text.
The text was updated successfully, but these errors were encountered: