Skip to content

Twilio WhatsApp support added#1173

Merged
caronc merged 1 commit intomasterfrom
twilio-whatsapp-support
Jul 22, 2024
Merged

Twilio WhatsApp support added#1173
caronc merged 1 commit intomasterfrom
twilio-whatsapp-support

Conversation

@caronc
Copy link
Owner

@caronc caronc commented Jul 22, 2024

Description:

Related issue (if applicable): Discord Request

This Pull Request allows you to add whatsapp:phoneno as target phone numbers in twillio. this will only work if you're hooked up with Twillio through them.

For example:

  • twilio://credentials/whatsapp:555-555-5555 would send the message though Whatsapp instead of the regular Twillio Infrastructure.

You can also shorten the code to just be w: (no need to spell out whatsapp:). Long naming is preserved so it aligns with Twilio documentation.

You can chain more phone numbers if you wish to as well:

  • twilio://credentials/w:555-555-5555/w:555-555-1234/

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@twilio-whatsapp-support

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  "twilio://credentials/target-no"

@codecov
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.26%. Comparing base (7efb6c5) to head (584c6ac).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1173   +/-   ##
=======================================
  Coverage   99.26%   99.26%           
=======================================
  Files         143      143           
  Lines       18578    18599   +21     
  Branches     3573     3576    +3     
=======================================
+ Hits        18442    18463   +21     
  Misses        124      124           
  Partials       12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caronc caronc merged commit 1e4b435 into master Jul 22, 2024
@caronc caronc deleted the twilio-whatsapp-support branch July 26, 2024 01:31
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

Successfully merging this pull request may close these issues.

1 participant