-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add a v2 client of hanu using the nlopes/slack client #14
Conversation
I like the idea of this; as I'm already mixing/matching between using hanu to handle the chat and nlopes to handle attachments / actions etc. I'm also hoping this handles disconnection better; as hanu in a long running proc seems to drop out (need to dig deeper on that one as nothing logs it just stops listening) The readme changes are good but it still mentions using bot.listen() in v2; but you've changed the code to Good additions 👍 |
also are you using the Bot User OAuth Access Token with this? |
Ah, nice catch with the Listen in the readme. I was also having problems with the hanu websocket connection dropping out after a time, it's why I wanted to try the RTM connection from nlopes. Sorry I didn't try to connect with it yet, will suck if we can't use the existing tokens :( More testing is required on my side for that. |
@penguinpowernz Im running the v1in a thread; hopefully it drops out when it cant do anything and it'll fall into a while loop; only recently started running it 24/7; new problems 😆 narrator: it didnt V1 stops listening but doesnt panic so the thread stays open while dead. |
outputs
Thought I'd got passed that error; didn't click I'd written it against the v1 not v2 😆 |
Changing the bot.go files new method to use auth test works fine. It doesn't like the Because its not a user
Not sure about the context bit yet but the above at least passes through update In
I just need to marinate this for 16 hours 😆 Looking good though. I'm going to c+p the "New" so I have new with debug. |
Oops, didn't see this chat before pushing latest, seems like I found the same info as you. Thank you for testing this! :) I also added some realtime messaging while I was there, but totally changed the Message object to just wrap a Edit: Oh my god, it's been 6 months!? |
It's failing some tests though:
I have had it working but not running for long periods of time. |
@penguinpowernz is there an issue with the function Edit: I've fixed it and made a PR against your v2 branch penguinpowernz#1 |
@penguinpowernz also would be great if you can add a go.mod |
@penguinpowernz I just forked in the end. Updated the slack refs etc. Mix and matched what I need from this with the core lib. |
@phanirithvij sorry I missed that PR, I really need a better way to get my github notifications than email. I added a go mod too, but the v1 and v2 schema is not supported now with go modules so its a bit awkward to import - I resorted to using the actually git commit SHA when doing the go get. @ChrisMcKee and all sorry for being so slow to respond, I've really only must started using this thing in anger. Slack better not remove the bot tokens, so much better to dial out than let something dial in, potentially exposing an attack vector. I'm not finished with the changes yet and will likely merge my v2 folder into the root repo and chuck it in master, if anyone still cares to use the changes. @sbstjn doesn't seem to be around so I'll just close this PR at that point. Thanks |
Closing this ticket, added the v2 code to master and tagged it with v2.0.0. If @sbstjn doesn't merge you can use my repo. |
This does not modify the existing client in any way, just adds a v2 package like many other go packages do. It uses the github.com/nlopes/slack package for the connections. #13 is also handled with this update.