Skip to content
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

Can we disable saving the qrcode img to file? #7

Open
huan opened this issue Oct 1, 2021 · 2 comments
Open

Can we disable saving the qrcode img to file? #7

huan opened this issue Oct 1, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@huan
Copy link
Member

huan commented Oct 1, 2021

请用手机QQ扫描二维码,若打印出错请打开:/home/huan/git/wechaty/wechaty-getting-started/data/12345/qrcode.png

The above image file is not necessary to be created and will generate rubbish files.

Can we disable this feature for the puppet?

@huan huan added the enhancement New feature or request label Oct 1, 2021
@anaivebird
Copy link
Collaborator

qrcode.png with device-{QQnumber}.json will be created on data/{QQnumber} folder.

image

The device json will save random device info for a enumlated phone device.
If we keep the device.json, and login for several days. Our QQ accound will be less likely to be banned since QQ server records we login constantly with same IP and device.

Also, since the exist of "device lock(设备锁)", we need to keep the device.json to prevent of allowing new device to login in each time.

image

@huan
Copy link
Member Author

huan commented Oct 4, 2021

Yes, we should save the data from device.json and keep it for reuse across sessions.

That information should be saved to MemoryCard that managed by Wechaty.

Please read the below lines of source code to understand how to use MemoryCard (puppet.memory.set()) :

https://github.com/wechaty/wechaty-puppet-wechat/blob/a45a4ab7e20bb9cfc328e904966a550dbdc8e3a0/src/puppet-wechat.ts#L1219

To summarize: the puppet.memory is managed by the Wechaty Puppet system, you can save/load critical data from and to it across sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants