wechaty / puppet-whatsapp

Wechaty Puppet for Whatsapp
https://npmjs.com/package/wechaty-puppet-whatsapp
Apache License 2.0
24 stars 17 forks source link

Refactor manager class #256

Closed su-chang closed 2 years ago

su-chang commented 2 years ago

Pick up whatsapp related methods from Manager class to whatsapp directory which contain these classes:

hcfw007 commented 2 years ago

I think manager refactor and event support should be divided into 2 PRs

su-chang commented 2 years ago

I think manager refactor and event support should be divided into 2 PRs

The title is refactor manager, and the real result is move methods which related WhatsApp directly in Manager to whatsapp directory as this pr describe.

BTW, if you think it's better to divided this PR into 2 PRs, I will do it later, and the first one is : refactor: split whatsapp event from manager class

and the second one is: refactor: move whatsapp.ts file from src to src/whatsapp dir

bung87 commented 2 years ago

src/whatsapp/whatsapp-base.ts and src/whatsapp/whatsapp-manager.ts less than 200 lines , but seperate to 2 files.

su-chang commented 2 years ago

src/whatsapp/whatsapp-base.ts and src/whatsapp/whatsapp-manager.ts less than 200 lines , but seperate to 2 files.

The WhatsAppBase will extends event listener EE, and other related classes extends it.

su-chang commented 2 years ago

This PR will be closed now, and it has already divided into 2 PRs: #257 and #258