Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Bug: 'client' bots for slack don't reply to owning user's messages #271

Closed
lauripiisang opened this issue Jun 9, 2016 · 2 comments
Closed

Comments

@lauripiisang
Copy link
Contributor

When you use a slack bot with 'client' permission (permission to see all messages the user sees and say stuff on behalf of the user), there's currently a bug where the bot doesn't hear the message of the owning user, since the ID is considered to be the user's ID.

I've fixed this in #268 by checking for presence of bot_id in the message, if the user id matches.This ensures a client bot won't hear itself, but will hear it's owner.

An additional fix would be to also check for ANY presence of bot_id if you don't want bots to talk to eachother.

// Background
I used botkit to build an RTM listener that allows people to connect with client privileges, spawns a bot for each of those users, which will reply to certain keywords. This enables bot answers based on context, even in private chats. And you never have to invite an actual bot anywhere. You are the bot.

@lauripiisang
Copy link
Contributor Author

What's complicated here? I've already added the pull request that deals with this!

@peterswimm
Copy link
Contributor

Pr merged! closing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants