-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support messaging over WhatsApp (foundation only) #1611
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some security issues and optimizations to handle.
# Register the fact that we got a WhatsApp event. | ||
# If there are too many rejects, then most likely a hack attempt. | ||
|
||
# FIXME: Where is the call verification? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The verification happens only once during registration of the webhook in the Meta Business Suite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs call verification. Anybody can call this endpoint.
# FIXME: Handle multiple events in a single call, as it clearly implied by `changes` | ||
# and `statuses` being a list in this call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be fixed.
# Send whatsapp message | ||
def send_whatsapp( | ||
self, flash_success: bool = True, flash_failure: bool = True | ||
) -> whatsapp.WhatsappTemplate | None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a wrapping send_phone
method that picks SMS or WhatsApp automatically — or both.
No description provided.