-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
save adapter name in robot class #647
Comments
Should be possible to just save it during the constructor as adapterName somewhere in here: https://github.com/github/hubot/blob/master/src/robot.coffee#L41 It's not as graceful, but you can sometimes 'sniff' for things on robot.adapter to try to determine what adapter it is. For example, this can be used to check for the campfire adapter: # campfire adapter
if robot.adapter.bot? The adapter itself could be updated to have name field too. |
thanks, I answered there by myself with my code sample for
(can't find the special data for campfire due to environment setup) better to have this in Anyway, good enough for me. |
Awesome, glad you were able to work something out in the interim! Agree that it'd be easier if robot just remembered the adapter name, or an adapter knew its own name. |
Can we just store the string on the robot? Checking methods seems really silly. |
Fixed in #663 |
in hubot script, sometimes the logic depends on the adapter.
If the adapter is started in
--adapter
, which may differ from theHUBOT_ADAPTER
environment, how can I get it in the script ?It will be nice if the adapter name is saved in
hubot/src/robot.coffee
when doingloadAdapter
I also put it in stackoverflow http://stackoverflow.com/questions/21746880
The text was updated successfully, but these errors were encountered: