Open huan opened 6 years ago
After thinking about it more, I feel maybe we should make autologin to true by default.
Your two approaches is good, I'd like to modify it a little:
WECHATY_PUPPET_PUPPETEER_AUTOLOGIN
, because we need a very clear namespace for all puppet implementations.WechatyOptions.autoLogin
is good, however, it would affect three modules: wechaty, wechaty-puppet, and wechaty-puppet-puppeteer.I'd like to suggest we use the environment variable name first.
And also I'll not disagree if you'd like to change the default behavior to autoLogin=true
Please feel free to let me know if you have any questions, thanks!
@zixia got it. let me take a look at this new repo and code base. it has been a while since last time i dug into it :) no worries about the late response. i know you guys have been busy in other adapters and those have higher priorities.
Moved from https://github.com/Chatie/wechaty/issues/1172 author: @alamusi
Provide Your Network Information
Where is the location of your server? (i.e. City, or In/Out China) North America
Which cloud platform(AliYun/Qcloud/DigitalOcean/etc) are you using? AWS
Run
npm run doctor
orwechaty run doctor
(for docker user), paste output hereWechaty Doctor
Expected behavior
Add configurable element to Wechaty.instance({}) to control the default init behaviour:
Actual behavior
puppet always calls clickSwitchAccount() per implementation on issue #636
Steps to reproduce the behavior (and fixes, if any)
@zixia correct!
Similar to some other web-wechat based projects, make the init behaviour configuration with a default value. if we set "autoLogin", then the puppet init will try to find the "log in" button to click; otherwise, the puppet init will try to find the "switch account" button to click (current behaviour)
The reason is that our client would like to have the ability to re-login to his/her previous wechaty instance without having to scan the QR, under the circumstances that the instance was kicked out by other web/mac/pc login.
thanks!
use 0.14 as an example, there are two approaches to pass the autoLogin option over.
once the autoLogin is passed over to puppet-web, the rest is the same
@zixia let me know which approach you would like to take. thanks