jammerware / margiebot

MargieBot is a .NET library designed to make building bots for Slack fast, easy, and fun.
MIT License
122 stars 42 forks source link

Fixed Listen method in MargieBotWebSocket. #31

Closed AronDavis closed 5 years ago

AronDavis commented 5 years ago

Reason for fix: The Listen method is not properly using _webSocket.ReceiveAsync. You're getting bad JSON because you're not checking result.EndOfMessage. So you're getting a partial message and then the "leftovers" are the things you're trying to "trim".

Here's a pull request that will fix issue #29 that I created.

jammerware commented 5 years ago

Thanks for your work on this and for teaching me a thing or two 💯

AronDavis commented 5 years ago

You saved me some time getting a bot running, so 👍 😛