athieriot / hubot-yammer

This is the Yammer adapter for hubot that allows you to send a message to him with Yammer and he will happily reply the same way.
31 stars 26 forks source link

Loop of bot replies #26

Closed KITSPaulCousins closed 8 years ago

KITSPaulCousins commented 8 years ago

Hey , love the yammer bot , its great. Got mine up and working with our enterprise yammer and it replies but seems to loop and reply the same message ,hits about 15 replies and then limit reached , any thoughts ?

Message creation status :201

Thanks for the effort.

emedvedev commented 8 years ago

Hi! What plugin/command do you use? Do you have the same error if you use the shell adapter? I don't remember anything that would make the adapter loop messages off the top of my head, and we didn't have this problem before, so it could be a faulty plugin.

KITSPaulCousins commented 8 years ago

Hi , its not occurring in the shell adapter ...edited the example.coffee for the hello and its response

output below , it sees message and then once complete see's the message again and repeats

groups list : Hubot groups_ids list : 8050160 received Hello from jacobquieros (thread_id: 703755607, sender_id: 1556147454) reply message to jacobquieros with text Hello welcome to Kingfisher what can I do for You? Message creation status 201 received Hello welcome to Kingfisher what can I do for You? from jacobquieros,paulcousins (thread_id: 703755607, sender_id: 1528103644) reply message to jacobquieros,paulcousins with text Hello welcome to Kingfisher what can I do for You? Message creation status 201

emedvedev commented 8 years ago

Do you use hear and respond in your script? On hear, bot will respond to "hello" from anyone (including itself, which obviously shouldn't happen), hence the cycle. On respond it will only respond to people addressing it by alias, which is usually preferred. In both cases the loop would be a bug, but it's much weirder on respond. :)

KITSPaulCousins commented 8 years ago

I think I get it cause I have still have variable on for the self reply so its then replying to my own response , DOHHHH

emedvedev commented 8 years ago

Oh, right. If you have HUBOT_YAMMER_REPLY_SELF, it's expected behavior. :) Should I close the issue?

KITSPaulCousins commented 8 years ago

Yep you can close the issue , thanks for the quick response , I was just lacking coffee