flexd / slackinviter

Go-ne slackin
MIT License
113 stars 34 forks source link

Slack invite as guest user #31

Open jtagcat opened 4 years ago

jtagcat commented 4 years ago

Ability to invite as a single-channel guest to an user defined channel. Single channel guests are not billed, great for leaving the form on your front page.

flexd commented 4 years ago

Feel free to make a pull request. But it has to be something you can turn on/off. Off by default

jtagcat commented 4 years ago

Yeah I was attempting to start to do that, but gave up on doing it today, since slackinviter uses a 3rd party api (go lib), what uses an undocumented api call, rather than an official one to invite users... So documenting an undocumented documentation, documenting the go lib and PR to it in order to fully use the undocumated unofficial api, then come back to this and add a toggle for restricted and ultra_restricted user, then channel(s) to invite to, on backend figure out how many or 0 channels to invite to and go through the go slack api again to find a way to invite users a channel and somehow meanwhile test, that restricted users don't get invited to the default channels. Good job with quite small amounts of documentation and using unofficial libs, what rely on unofficial undocumented api calls :clap:

flexd commented 4 years ago

This project is almost 4 years old, and still works as expected for my use case, which is to run the invite for the Gophers Slack :-)

github.com/nlopes/slack is pretty much the defacto way of using the Slack API from Go last time I checked. See https://api.slack.com/community

You can probably use one of the methods here, https://github.com/nlopes/slack/blob/ddf01ed441a61cc9452f390e4e41274a03ba1796/admin.go#L42 https://godoc.org/github.com/nlopes/slack#Client.InviteGuest

I agree it could be better documented, feel free to improve on that.