slackapi / hubot-slack

Slack Developer Kit for Hubot
https://slack.dev/hubot-slack/
MIT License
2.3k stars 637 forks source link

Allow hubot to receive "private messages" (slash commands?) #16

Closed patcon closed 9 years ago

patcon commented 10 years ago

Not sure if slash commands are the right route, as they seem to require individual setup: https://myteam.slack.com/services/new/slash-commands

Perhaps slack could expose another event for commands, if they haven't already? Need to investigate :)

patcon commented 10 years ago

Maybe outgoing webhooks? https://myteam.slack.com/services/new/outgoing-webhook

modius commented 10 years ago

When I was using HipChat you could send private HUBOT commands to a personal room with you and the HUBOT; HUBOT has to have its own user account.

Feels like I should be able to have HUBOT requests picked up in the "slackbot" direct chat window.

However it's handled, we really need the option to talk to HUBOT privately rather than polluting a channel with stuff. For now, should i be setting up a private channel for just me to talk to HUBOT on my lonesome?

patcon commented 10 years ago

Yeah, ability to rename slackbot to whatever your bot is, and to message him directly, would largely solve the root problem in a really clear way for end-users.

We created a #hubot channel and use it to run loud commands, talk about hubot, and test out new scripts. (Having said that, I've probably overloaded that room with too many uses :)

modius commented 10 years ago

A good start would be a flag on hubot integration to allow listening to slackbot 'channel'. That way we can chat privately to the service and nothing tricky is involved.

I'm not in favour of renaming poor slackbot ;)

orlando commented 10 years ago

any updates on this, I really want this feature,

btw.. Happy new year!

andyfowler commented 10 years ago

Hate to comment with a simple +1, but this is a pretty important one to us.

Our support team interacts with our Hubot throughout the day, and it's nice to have a separate "channel" just for that interaction. Overloading slash-commands wouldn't be as ideal.

grantmd commented 10 years ago

This is definitely coming, and is more something that needs to be supported on the Slack side. We're working on it in a general fashion for all integrations.

orlando commented 10 years ago

:+1: yeah I hate to bump the thread without any contribution, but we can't do much about it in the hubot-slack side.

@grantmd thanks for the hard work

altryne commented 10 years ago

:+1:

cmalven commented 10 years ago

:+1:

patcon commented 10 years ago

This can be done without Slack's help :) Just have the adapter expose an endpoint to receive the payload from a /hubot slash command: https://myteam.slack.com/services/new/slash-commands

EDIT: Wait. Confused. Just saw @grantmd's comment above... Am I wrong on that?

EDIT2: Ah. Incoming webhooks don't work for private messages. That's the hold-out, I guess :)

evansolomon commented 10 years ago

Incoming webhooks don't work for private messages

Not that it's really being debated here, but just to clarify, I consider this a feature (not a bug).

atmos commented 10 years ago

We replaced addressing our bot with / for the past few years and it's really convenient. I hate typing hubot image me pugs and the fact that slackbot is this thing that I don't use.

I'd love to be able to:

patcon commented 10 years ago

@evansolomon :+1:

altryne commented 10 years ago

We went another way, We needed Hubot to be behind firewall. So instead of using this adapter, we talked to the slack team, and they suggested creating a "user" for hubot, and using the hubot-irc adapter. Private messages work there seeing as hubot is one of the guys basically

mseeks commented 10 years ago

@altryne Did you have any more information about how to use hubot-irc with slack? I currently need the private message feature so if this method still works it'd be a great patch until this adapter has an official way.

mseeks commented 10 years ago

@altryne It took me a little while to find the IRC info in the dashboard, but I did so nevermind. Thanks anyway. :P

orlando commented 10 years ago

@alirayl could you point out where's the information? thanks :)

altryne commented 10 years ago

@orlando it's at https://my.slack.com/account/gateways If the gateway for irc isn't there, you need to enable it, in the link above the page

alirayl commented 10 years ago

@orlando There's some general IRC/XMPP documentation to get you started at https://slack.zendesk.com/hc/en-us/articles/201727913-Connecting-to-Slack-over-IRC-and-XMPP. Please let me know if it's lacking in any way and I'll improve it!

orlando commented 10 years ago

@alirayl @altryne thanks! :+1:

lusis commented 10 years ago

As a side note, we did the same thing (irc adapter to slack). We lose a bit of the richness of integrations formatting but that could be solved with a modified irc adapter that did a webhook to slack. In essence the irc adapter would be for listens but the webhook would be sending.

lusis commented 10 years ago

Note that this was because we needed to protect our hubot behind a firewall as well.

altryne commented 10 years ago

@lusis we did the same thing, hubot listens on irc, and responds over api if it's in a room, or via irc when it's a private 1on1 message

lusis commented 10 years ago

@altryne well now I don't feel so silly thinking about shaving that yak :+1:

jeffbyrnes commented 10 years ago

:+1: to this as well (yes, I read all the comments, and realize it's mostly on Slack's side). Might go the IRC route for now.

@altryne any chance you could show how you tweaked your Hubot to listen on IRC & respond via API?

altryne commented 10 years ago

Sure think @jeffbyrnes Created a Gist for this https://gist.github.com/altryne/885ae98ea36dd7c897f7

jeffbyrnes commented 10 years ago

Awesome, thanks!

jeffbyrnes commented 10 years ago

Should be pointed out, @grantmd gave a great response to the larger issue here (Hubot as a user) over on #1. Looks like they're exploring how best to handle that in Slack itself, so hopefully, with a little patience, well be able to DM the boy & see it in user lists in channels.

arikscore commented 10 years ago

:+1: All comments are pretty old, even the ones promising an improved integration in the other thread. Is there anything new on the issue?

grantmd commented 10 years ago

Very sorry for the radio silence on this, as I didn't want to say anything until I was more sure.

We are "weeks" away from the release of a new adapter as well as a ton of backend work to allow more integrations to do the things that the new adapter will do (can join private rooms, can be DMd, can be invited/kicked from rooms, will show up in presence lists, will autocomplete the username, etc).

Prior to the full release, we will be doing a beta of this new adapter. When we're ready to do that, I'll be contacting everyone who has asked about it on here. Thanks for your patience!

ESPNMichaelKidd commented 10 years ago

@grantmd I'd also be interested in the beta adapter, as it's available. Thanks for the hard work.

myusuf3 commented 10 years ago

ummm I would like this new adapter swag if possible too. thanks @grantmd

bobrik commented 10 years ago

@grantmd count me in

speier commented 10 years ago

@grantmd great news, i'm definitely interested in a beta adapter as well, keep up the good work.

altryne commented 10 years ago

@grantmd will the new adapter be able to sit behind a firewall? The current set-up we have at @fundbox is we're connecting our own hubot with irc-adapter to the irc gateway. This allows for all the things you've written, DMs, etc', and he can send messages via incoming webhook to slack as well. But it would be nice to remove one member of the team for a more robust integration you @slack devs

dinesh2609 commented 10 years ago

@grantmd great news, i'm interested in a beta adapter as well. Awesome work Guys!

Taytay commented 10 years ago

I was reading through this a few hours ago, and am relieved to see @grantmd 's message now! That's great news! :+1:

chriscohoat commented 10 years ago

@grantmd count me in too! Appreciate all of the hard work.

interskh commented 10 years ago

:+1: Thanks @grantmd for the hard work! Would love to test beta adaptor :smile:

johnallendyer commented 10 years ago

That's awesome @grantmd. If you need more eyes on it, count me in for the beta.

aendra-rininsland commented 10 years ago

+1 for beta — sounds rad.

aughban commented 10 years ago

beta would be great.

jeffbyrnes commented 10 years ago

:+1:

bfirsh commented 10 years ago

:+1: would also be interested!

tshedor commented 10 years ago

+1 really appreciate this adapter and the work being done. Please count me in for the beta

pefernandez commented 10 years ago

Yes! what I've been waiting for to take our Hubot to a new level.

wagmiwiz commented 10 years ago

Also interested in beta testing the new adapter, good stuff!

MarkPfennig commented 10 years ago

also interested!

iamhabitat commented 10 years ago

I'm interested in the beta as well. Nice job!