bettersg / checkMate

GNU General Public License v3.0
5 stars 0 forks source link

Refactor user handler to isolate whatsapp-specific logic from rest of checking mechanism #278

Open sarge1989 opened 3 months ago

sarge1989 commented 3 months ago

Context/Rationale

Remarks

sarge1989 commented 3 months ago

@btjl when you are free and done with the website tasks, can work on this I guess! It's not super urgent and will give you a good platform to properly get familiar with the most core parts of the codebase and architecture.

Once you are familiar with the code and what needs to be done here, let's discuss the schema of the instance data object to be put into the pub/sub queue. We can also discuss other possible architectures if needed.

btjl commented 2 months ago

Having looked through the code, I think not just the handlers but the instance object itself has many WhatsApp-specific properties. Curious if you'd like to keep it this way, so something like a parent instance class representing properties that are platform agnostic, followed by extending the class to platform-specific properties?

sarge1989 commented 2 months ago

Yeah @btjl I agree! We can do something like the above. Can feel free to propose how a new data object can look like for instances. Originally it was built just for whatsapp, but I think it's worth thinking about how to make it agnostic