java-wechaty
java-wechaty copied to clipboard
Support WECHATY_PUPPET_SERVICE_TOKEN
- Add
WECHATY_PUPPET_SERVICE_TOKEN
support for all our Polyglot Wechaty projects. - Make
WECHATY_PUPPET_HOSTIE_TOKEN
an alias forWECHATY_PUPPET_SERVICE_TOKEN
, and print a warning message to let the user know it was deprecated with it has been set.
Learn more from https://github.com/wechaty/wechaty/issues/2123
I can have a look at this change this weekend, if no one volunteers.
Have had a look in the code, Java wechaty library doesn't hardcode the token variable. it accepts the token as string. It is application to set up the token variable. So no change is required from this project.
https://github.com/wechaty/java-wechaty/blob/a0a374b8db2575f39306cbb0aa84b5950ff35a74/wechaty/src/main/kotlin/io/github/wechaty/Wechaty.kt#L386
I will update java-wechaty-getting-started project to reflect the token variable change.
https://github.com/wechaty/java-wechaty-getting-started/blob/63f9fe47ff03bb2722670786cca743bb13121d97/examples/src/main/java/io/github/wechaty/DingDongBot.java#L15
Thanks for your information that Java Wechaty does not support setting token from environment variable yet!
It would be great if we can add a WECHATY_PUPPET_SERVICE_TOKEN
environment variable to Java Wechaty so that the developers can be easy to switch the Wechaty Puppet Service by simple setting the env var.
And I'm drafting a Polygram Wechaty Specification this week (here), which all the Polygram Wechaty should apply because it will make developers easily to use Wechaty when they are switching languages.