Giter Site home page Giter Site logo

Comments (15)

m9 avatar m9 commented on May 29, 2024

As far as I can see - there is no pastes feature at all(or at least it doesn't work on android)

But def. πŸ‘

from hubot-slack.

atmos avatar atmos commented on May 29, 2024

Was there every any resolution for this? Is there a way to send richly formatted messages?

from hubot-slack.

evansolomon avatar evansolomon commented on May 29, 2024

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?

from hubot-slack.

mattikus avatar mattikus commented on May 29, 2024

A tactic I've been trying has been to copy scripts out of hubot-scripts and
bring them into my scripts tree and then modify them when the out of box
script doesn't quite fit with slack.

Then you're able to do the logic for converting for display at that level,
rather than the adapter.

On Sat, Jun 14, 2014 at 7:25 PM, Evan Solomon [email protected]
wrote:

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?

β€”
Reply to this email directly or view it on GitHub
#17 (comment)
.

from hubot-slack.

atmos avatar atmos commented on May 29, 2024

@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.

from hubot-slack.

paulhammond avatar paulhammond commented on May 29, 2024

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?

from hubot-slack.

eric avatar eric commented on May 29, 2024

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".

from hubot-slack.

paulhammond avatar paulhammond commented on May 29, 2024

[cc @technicalpickles to see if he has any ideas]

from hubot-slack.

technicalpickles avatar technicalpickles commented on May 29, 2024

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 send a string with newlines, it will come out as a paste. If you need to send multiple messages, you can call send with multiple arguments.

We could fake this support inside hubot-slack (either by creating a Slack snippet, or by using Slack's built in message formatting

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.

I'm worried doing that would break scripts for people that are happily using our existing multiline message support (like, for example, Evan above).

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.

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".

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.

from hubot-slack.

pixelrebel avatar pixelrebel commented on May 29, 2024

Just checking in on this. Are snippets supported at this time?

from hubot-slack.

technicalpickles avatar technicalpickles commented on May 29, 2024

Another option: when multiple lines are detected, wrap it up in an attachment using customMessage. Attachments only show the first 5 lines by default, so that'd prevent flooding.

from hubot-slack.

technicalpickles avatar technicalpickles commented on May 29, 2024

I put a fix for this together over at #235 if anyone wants to try it.

Are snippets supported at this time?

Worth noting that snippets are just file uploads under the hood, and as talked about in #62, files.upload isn't supported for bot users.

from hubot-slack.

kiliankoe avatar kiliankoe commented on May 29, 2024

#62 has since been updated that files.upload is now supported for bot users. Just FYI 😊

from hubot-slack.

DEGoodmanWilson avatar DEGoodmanWilson commented on May 29, 2024

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.

from hubot-slack.

johnagan avatar johnagan commented on May 29, 2024

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!

from hubot-slack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.