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

Send WhatsApp message to any number #8

Open
fvm2 opened this issue Mar 15, 2024 · 1 comment
Open

Send WhatsApp message to any number #8

fvm2 opened this issue Mar 15, 2024 · 1 comment

Comments

@fvm2
Copy link

fvm2 commented Mar 15, 2024

In whatsapp_utils.py module the function process_whatsapp_message(body) gets the wa_id parameter, but in line 92 we sent the response to the hardcoded environment parameter "RECIPIENT_WAID".

line_92

In order to answer to any number that send us a message, get_text_message_input(current_app.config["RECIPIENT_WAID"], response) should change to get_text_message_input(wa_id, response)?

Or is there another way to respond to any number?

@teddysgame
Copy link

OpenAI Integration

response = generate_response(message_body, wa_id, name)
responses = process_text_for_whatsapp(response)

# receipientNo is to get the number of the sender to used for responds to the sender
receipientNo = "+" + wa_id

data = get_text_message_input(receipientNo, responses)
send_message(data)

just get the sender's number from the wa_id.

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

2 participants