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

Some deprecated functions need to be updated #114

Closed
0kuang opened this issue Oct 28, 2021 · 4 comments
Closed

Some deprecated functions need to be updated #114

0kuang opened this issue Oct 28, 2021 · 4 comments

Comments

@0kuang
Copy link

0kuang commented Oct 28, 2021

https://github.com/padlocal/wechaty-puppet-padlocal/blob/a4b04b723fc4f75d08596a2952e08f4b5037983c/src/puppet-padlocal.ts#L145

StateSwitch on() is deprecated: use active() instead.

Similarly, replace off() with inactivate() .

@huan
Copy link
Member

huan commented Oct 28, 2021

@0kuang It's great to know that you are following our latest version of Wechaty, and thank you very much for filing this issue to improve the Wechaty ecosystem.

With the latest puppet design, we can remove all the state management code from the implementation of the puppet-padlocal, and reuse the code from PuppetAbstract class, here's the related issue:

The suggested change will be:

  1. Rename start () to onStart ()
  2. Remove all this.state checkings and try {} catch code
  3. Do the same to the stop ()

See: https://github.com/wechaty/puppet-wechat/blob/e34c8a1a998e045814b3dff052f74385de7a464b/src/puppet-wechat.ts#L182-L197

@0kuang
Copy link
Author

0kuang commented Oct 29, 2021

Thank you for your timely response. I'm looking forward to the new version v0.51.

@huan
Copy link
Member

huan commented Nov 4, 2021

You are welcome.

I have talked with @padlocal this week and we hope the PadLocal can be adapted with the new v1.x API soon.

@padlocal
Copy link
Collaborator

Fixed on branch esm, will be publisehd in version 1.x soon,

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

No branches or pull requests

3 participants