rauchg / slackin

Public Slack organizations made easy
http://rauchg.com/slackin/
MIT License
6.51k stars 1.35k forks source link

Channel Id is always undefined. New user is added as normal user #366

Open ajayak opened 6 years ago

ajayak commented 6 years ago

https://github.com/rauchg/slackin/blob/e41687b286c4dcaa24538383bd8a191d8e1b0871/lib/index.js#L193

Because of variable scoping, slack is undefined and chanId is always null

For quickfix in my app, I make this chanId to a global variable and use this globals.chanId for channel id. https://github.com/rauchg/slackin/blob/e41687b286c4dcaa24538383bd8a191d8e1b0871/lib/index.js#L122