-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically make a send() with a "\n" be converted to a paste #17
Comments
As far as I can see - there is no pastes feature at all(or at least it doesn't work on android) But def. 👍 |
Was there every any resolution for this? Is there a way to send richly formatted messages? |
I don't think I understand the issue. We use hubot commands that send multi line messages. They act the way I'd expect...a message appears with multiple lines. Is that not how it works for others? Is a "paste" a special kind of thing? |
A tactic I've been trying has been to copy scripts out of hubot-scripts and Then you're able to do the logic for converting for display at that level, On Sat, Jun 14, 2014 at 7:25 PM, Evan Solomon notifications@github.com
|
@evansolomon in campfire you can paste and it preserves simple text formatting. I'm gonna try to send tables of info back with #32. Not sure if I can do that or not. |
The challenge here is that Slack's servers don't work the same way Campfire does... Slack doesn't have the concept of "pastes". We could fake this support inside hubot-slack (either by creating a Slack snippet, or by using Slack's built in message formatting) but I'm worried doing that would break scripts for people that are happily using our existing multiline message support (like, for example, Evan above). Is there still demand for this functionality? |
It definitely makes interoperating with scripts that were created with campfire in mind less pleasant to use from Slack. It definitely could help if hubot got a little bit more of an explicit API for "chunks of text that should be formatted with a fixed width font and possibly collapsed". |
[cc @technicalpickles to see if he has any ideas] |
This is a tough one. Hubot has historically been pretty campfire centric, so in most cases that I've written community scripts, it's assumed that if you
I think creating snippets seems most analogous with pastes, which make a lot of sense to me. I don't think the builtin message formatting would work out as well, because most off the shelf scripts probably won't be expecting to be formated in anyway, just pasting.
That is going to be a problem for sure. I don't think there's a way to know how many people are using off the shelf scripts and it's sending multi-line text as multiple message, versus people creating their own versions that customize it, and I can't think of a good way to determine that. That said, my gut says there's less people doing the latter, so sending multiline text as a snippet would make sense for more people getting started, in addition to being easier for people transitioning from hubots running on Campfire.
I could see that possibility too. But it's a change to the API, which would take time for people to transition their scripts to, as well as updating their bot to a version with it. On the plus side, it might be nice for the IRC adapter, as while it doesn't have any native way to paste text, could use a pastebin or gist type thing under the hood. |
Just checking in on this. Are snippets supported at this time? |
Another option: when multiple lines are detected, wrap it up in an attachment using |
#62 has since been updated that |
I'm of two minds about this. On one hand, a message with line breaks in it is a perfectly valid message—on the other, as has been noted, it is different behavior from what is often expected. What if we included an optional flag to indicate that a message should instead be uploaded as a snippet? I'm not entirely in love with this idea, but I am very reluctant to change the default behavior. |
I'm closing this because I doesn't seem like something we're going to take on. It seems to be a hot topic (a year ago), so if folks still feel strongly about it, let's discuss in a PR on how it might work. Thanks! |
Our campfire hubot plugins often send pastes by including a
\n
in asend()
, but in slack it doesn't show up as a paste (and can often flood the room).The text was updated successfully, but these errors were encountered: