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
add blacklist/whitelist support back in, especially #general #214
Comments
so i can not track to see if hubot was ever invited to #general, but still a nice feature to have in case it was ever invited. |
I have added a whitelist regex in a forked version and so far so good. https://github.com/GravityLabs/hubot-slack/commit/6bfae0202ea8f1124cd27dcad2e31183c42c411f |
I would also like to see this feature, as I work on a team where I don't have /kick rights to any channels, but we do have our own bot for my group's channel. It would be nice to be able to forbid the bot from joining #general |
+1 Beyond just general, there is nothing stopping anyone else inviting the bot into their channel and using it. Just out of curiosity, it looks like this was implemented in #15. Any reason it was removed? |
Couldn't this be implemented as a middleware? Catch all incoming messages, filter against a whitelist/blacklist and proceed as necessary. |
@samuelcouch Sorry, I'm totally new to hubot. Didn't realize this was a thing. I'll have to look into it. Thanks! |
No worries at all! https://github.com/github/hubot/blob/master/docs/scripting.md#middleware is the relevant portion that I'm thinking could be used. |
Wow... That was ridiculously easy. If anyone else wants to use it, hubot-slack-whitelist-middleware
Thanks @samuelcouch! |
Rad! Glad it worked @michaeljacobdavis |
How can we help move this forward? @bitflingr did you create a PR for your fork? I published your code as a separate npm module. https://www.npmjs.com/package/hubot-slack-whitelist It would be better if we could get this code back into hubot-slack master branch and the main hubot-slack npm package. Surely there are other Slack teams who need this capability. |
@scarolan As @samuelcouch mentioned, any reason this shouldn't be middleware? You can do it in 6 lines of code if you want to implement it or just use hubot-slack-whitelist-middleware. If it doesn't do what you want, feel free to open a pull request with new features. |
The issue I've found with the middleware is the bot stops responding to private messages when I've got it installed. I've tried to figure out how to fix the issue, but I don't understand it well enough to fix it myself. |
Unfortunately, |
I am in a team with hundreds of users and we would like to keep communication down to a minimum. Unfortunately Hubot likes to autojoin to #general. Not sure if this is part of the Slack API but if so we should have hubot ignore all messages from #general and any other channel that my not benefit from it. I understand that it is restricted by invitation but if so, lets at least add the option to ignore #general.
The text was updated successfully, but these errors were encountered: