Skip to content

Commit

Permalink
Use whatsapp phone in adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewLester committed Feb 16, 2022
1 parent df853c4 commit 866c2fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zubhub_backend/zubhub/creators/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def confirm_group_invite(self, request, creator, creatorgroup):
"""
creatorgroup.members.add(creator)
creatorgroup.save()

def get_whatsapp_from_phone(self):
return settings.DEFAUL_WHATSAPP_FROM_PHONE

Expand Down Expand Up @@ -87,8 +87,8 @@ def send_whatsapp(self, template_name, phone, context):
whatsapp_phone = "whatsapp:" + phone
client = Client(settings.TWILIO_ACCOUNT_SID,
settings.TWILIO_AUTH_TOKEN)
text = self.render_text(template_name, phone, context,
from_phone=self.get_whatsapp_from_phone())
text = self.render_text(template_name, whatsapp_phone, context,
from_phone=self.get_whatsapp_from_phone())
client.messages.create(**text)

def send_confirmation_text(self, request, phoneconfirmation, signup):
Expand Down

0 comments on commit 866c2fb

Please sign in to comment.