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

Flowdock Multi-Messages out of order #691

Closed
JoshCheez opened this issue Apr 25, 2014 · 7 comments
Closed

Flowdock Multi-Messages out of order #691

JoshCheez opened this issue Apr 25, 2014 · 7 comments

Comments

@JoshCheez
Copy link

Im running hubot in a flowdock chat instance and I have a script that sends several msg.send into flowdock chat from a loop. When I run the script in the console, the messages display in order, but when I run the script in flowdock, the messages come in seemingly random order. This seems like an issue with flowdock, but I was wondering if there was anything I can add to my code to make sure they send in order.

@parkr
Copy link
Contributor

parkr commented Apr 25, 2014

If there is a callback for the msg.send (or if one were added), that would assure that each sends in chronological order. msg.send is non-blocking so whichever request is honored by the API first will likely be the first message you see, and similarly for each subsequent message.

@technicalpickles
Copy link
Member

msg.send is async, so calling it multiple times wouldn't necessarily come in a specific order. If you can know what all the messages you want to send are, you can send an array and the adapter should take care of the order:

msg.send "foo", "bar", "baz"

You can also build an array, and then use the splat operator:

messages = []
msg.send message...

@JoshCheez
Copy link
Author

Tried that and the timing was still off. I ended up creating a really long string with \n throughout the string and msg.send the whole string and it worked.

Thanks,
Josh

@Mumakil
Copy link

Mumakil commented Sep 23, 2014

I created an issue to the hubot-flowdock repo since it's the adapter's fault.

@technicalpickles
Copy link
Member

@Mumakil I checked hubot-flowdock for PRs around this, but didn't see any: https://github.com/flowdock/hubot-flowdock/pulls?utf8=%E2%9C%93&q=author%3AMumakil . Did you mean this for another issue?

@Mumakil
Copy link

Mumakil commented Jun 8, 2015

@technicalpickles this was fixed last september flowdock/hubot-flowdock#54

@technicalpickles
Copy link
Member

@Mumakil great, thanks!

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

No branches or pull requests

4 participants