whatsapp-chatgpt icon indicating copy to clipboard operation
whatsapp-chatgpt copied to clipboard

code refactoring

Open Zain-ul-din opened this issue 2 years ago • 1 comments

added type to config.

Zain-ul-din avatar Feb 19 '23 16:02 Zain-ul-din

@navopw please can you merge and fix this?

Zain-ul-din avatar Feb 19 '23 17:02 Zain-ul-din

Did the refactoring already:

image

navopw avatar Feb 19 '23 20:02 navopw

Did the refactoring already:

image

@navopw It seems that the main branch doesn't match what I wrote, which has invalidated my efforts. Given the behavior of the authors, I don't think it's reasonable to continue any further. Good luck for your repository.

Zain-ul-din avatar Feb 19 '23 20:02 Zain-ul-din

Hey @Zain-ul-din, sad to hear that. I didn't want to invalidate your efforts.

I was waiting for the changes from the review and quickly did it myself (5 minutes work). Really like to proceed asap.

I have adopted your changes almost exactly:

  • Constants
  • Config

What I haven't adopted:

  • Whatsapp & messages functions in separate file

I also wish you the best!

navopw avatar Feb 19 '23 21:02 navopw

@navopw

image SS from master can you compare my index.ts with it?

Zain-ul-din avatar Feb 19 '23 21:02 Zain-ul-din

Yours is different since you moved out the sendMessage logic (which I renamed to handleIncomingMessage).

Also like I stated:

What I haven't adopted:

Whatsapp & messages functions in separate file

navopw avatar Feb 19 '23 21:02 navopw

The function handleIncomingMessage is located in a distinct file within the pull request. Do you recall agreeing to merge the pull request and simply include config.ts? However, you did not follow through on your commitment.

Zain-ul-din avatar Feb 19 '23 21:02 Zain-ul-din

Feel free to contribute another PR that does this. I will merge it.

Don't have the time to discuss such small details.

However it's a good idea to put it in a separate file.

navopw avatar Feb 19 '23 21:02 navopw