Skip to content
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

Hubot can hear itself in Flowdock? #55

Closed
victorhooi opened this issue Sep 23, 2014 · 5 comments
Closed

Hubot can hear itself in Flowdock? #55

victorhooi opened this issue Sep 23, 2014 · 5 comments

Comments

@victorhooi
Copy link

I have a script that's listening for a certain string (using robot.hear), and then sending a message back (using msg.send) that also happens to contains that string.

However, Hubot in Flowdock hears itself, and hence just endless repeats the same message.

I just wanted to confirm - is this intended behaviour?

Is there any way to stop Hubot from hearing itself?

(The IRC adapter has an ignore array - nandub/hubot-irc#106).

@Mumakil
Copy link
Contributor

Mumakil commented Sep 23, 2014

Thanks for reporting. The adapter should ignore all messages by the bot itself so this is not intended behavior. Which versions of hubot and hubot-flowdock are you using?

@Mumakil
Copy link
Contributor

Mumakil commented Sep 23, 2014

Also, are you sure the name is configured properly? This situation can happen, if your hubot thinks it's named something else than what its Flowdock nick actually is. Make sure that HUBOT_NAME environment variable is correct or that the bot is started using the -n Nick flag and that corresponds to the Flowdock nick.

@victorhooi
Copy link
Author

I'm using Hubot 2.8.1 with Hubot-Flowdock 0.6.5.

Aha, I wasn't aware of the requirements around the name for Hubot.

Is there a way to get Hubot to print out what it believes the name to be?

I tried setting the environment variable HUBOT_NAME prior to starting up bin/hubot - after that, the bot didn't respond to anything, until I unset that variable.

Also, I tried using the -n flag:

bin/hubot -a flowdock -n Victor

Likewise, my bot didn't seem to work whilst that flag was passed in.

Any thoughts?

@victorhooi
Copy link
Author

@Mumakil Aha, this was due to silliness on my part - I forgot that if I changed the bot name, he'd also only respond to commands on that new name...facepalm.

I can confirm that this works as designed - if I set one user's Display name to the hubot name, hubot will not respond/hear any messages from that user =).

Thanks for your help. Also - small thing, but is it possible to add a small note to the README noting this, and that it's the Display name that it checks? E.g.:

#57

Also, I noticed that the hubot-hipchat adapter automatically sets the Hubot bot name to the user it logins as:

https://github.com/hipchat/hubot-hipchat/blob/89a6dbb792c8f8c6df5018e66272477309261eab/README.md

You can also remove the -n Hubot arg as the bot will automatically fetch its @mention name from HipChat.

Is this something that could be implemented with hubot-flowdock?

@Mumakil
Copy link
Contributor

Mumakil commented Sep 24, 2014

Great that it works now and sorry for the confusing docs. I'll check the pr and we'll look into setting the name automatically!

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

No branches or pull requests

2 participants