Closed MikelCalvo closed 3 weeks ago
What was the previous behavior? i can't remember. i think you also need to add if(modelToUse == undefined && ...)
what if a user is sending a message to themself using a prefix.
@Zain-ul-din, Previously if the prefix wasn't enabled, then it would answer to any whatsapp message. What I intended to do was to set the enablePrefix to true but selfMessage.skipPrefix also to true, so that an external user would need to use the prefix, but if you are messaging yourself it wouln't be needed.
About the modelToUse == undefined, you are totally right, I'm adding a new commit with that so if a user includes a prefix it would be handled by the current logic below instead of with the defaultModel.
I just added a feature send welcome message
one per sessions. In this commit, I'm setting skipPrefix
value default to false since the welcome message is a direct message that's why it causes a request to our bot again.
So that users can skip adding the prefix when they are messaging themselves