swapnilsparsh / Rescue

A women’s safety website that sends emails and messages to your trusted ones.
MIT License
119 stars 186 forks source link

Added Mobile SMS Alert Feature #289

Closed harshakhmk closed 3 years ago

harshakhmk commented 3 years ago

Related Issue or bug

Describe the changes you've made

Added an SMS alert feature that goes to all saved contacts during an emergency parallelly with email and WhatsApp notifications that are sent. For the SMS provider, I have used the Twilio API service which is free up to a certain duration but seems best among its alternatives, as the alert should be sent as soon as possible others took a long time to do this task whereas Twilio doesn't take much time I have also updated the requirements.txt as there is an additional package required for loading environment variables which is python-dotenv==0.17.1

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

A clear and concise description of it.

Checklist:

https://user-images.githubusercontent.com/56113657/117696633-274b4600-b1df-11eb-9365-bad26939c23e.mp4

swapnilsparsh commented 3 years ago

@harshakhmk Can you add a working video?

harshakhmk commented 3 years ago

@harshakhmk Can you add a working video?

Is the code fine as in maintaining account_id and account_token in environment variables or do I need to make any changes in the style of coding I will add it within a day

swapnilsparsh commented 3 years ago

@harshakhmk I will be waiting for the working video till then I will inspect your code.

harshakhmk commented 3 years ago

@harshakhmk I will be waiting for the working video till then I will inspect your code. @swapnilsparsh

I have already added the working video above and made some minor code changes In case it's not visible I am adding it here again

https://user-images.githubusercontent.com/56113657/117832067-c8df9f80-b292-11eb-9d46-5fc01a622145.mp4

swapnilsparsh commented 3 years ago

@harshakhmk Twilio has a limitation I guess, is there any alternative method as I have used Twilio when I was working on this issue.

harshakhmk commented 3 years ago

@harshakhmk Twilio has a limitation I guess, is there any alternative method as I have used Twilio when I was working on this issue.

@swapnilsparsh I found Twilio as the best among its alternatives as delivers messages quickly which is mandatory when someone is in emergency. Other solutions were using smtplib which can deliverer SMS but it takes more than 15min to deliver SMS which is not good in an emergency and sometimes it doesn't even deliver a message. Even though Twilio is economical, it would definitely suit the purpose. If you have any other alternatives, you can share them with me, I will try implementing them.

swapnilsparsh commented 3 years ago

@harshakhmk Twilio has a limitation I guess, is there any alternative method as I have used Twilio when I was working on this issue.

@swapnilsparsh I found Twilio as the best among its alternatives as delivers messages quickly which is mandatory when someone is in emergency. Other solutions were using smtplib which can deliverer SMS but it takes more than 15min to deliver SMS which is not good in an emergency and sometimes it doesn't even deliver a message. Even though Twilio is economical, it would definitely suit the purpose. If you have any other alternatives, you can share them with me, I will try implementing them.

Sorry for the inconvenience caused but we are looking for an alternative to Twilio only as we have used Twillio in past and it's not good enough, if possible then use some alternative of Twillio other than smtplib as it takes time.

khanfarhan10 commented 3 years ago

Same problem here : Merge Conflicts Exist: @harshakhmk

harshakhmk commented 3 years ago

Same problem here : Merge Conflicts Exist: @harshakhmk

That's because I have changed some part of the code in views and also this branch is not up to date

harshakhmk commented 3 years ago

I have found an alternative for SMS alert, is this still needs to be addressed @swapnilsparsh

swapnilsparsh commented 3 years ago

I have found an alternative for SMS alert, is this still needs to be addressed @swapnilsparsh

If you want to contribute to the project you can but you will not be getting any points for this PR in GSSOC 21.

harshakhmk commented 3 years ago

Lol I don't need any points, tell me whether my name gets added to the contributor's list?

swapnilsparsh commented 3 years ago

Lol I don't need any points, tell me whether my name gets added to the contributor's list?

Yes, your name will be added to the contribution list.

harshakhmk commented 3 years ago

I will make a new PR