Skip to content

Commit

Permalink
fix: send_location() error (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wingrammer authored Oct 10, 2024
1 parent bcb9278 commit 8f2cd26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions whatsapp/ext/_send_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ def send_location(self, lat: str, long: str, name: str, address: str, recipient_
>>> whatsapp.send_location("-23.564", "-46.654", "My Location", "Rua dois, 123", "5511999999999")
"""
try:
sender = dict(self.instance.l)[sender]
sender = dict(self.l)[sender]



except:
sender = self.instance.phone_number_id
sender = self.phone_number_id

if sender == None:
sender = self.instance.phone_number_id
sender = self.phone_number_id

url = f"https://graph.facebook.com/v18.0/{sender}/messages"
data = {
Expand Down

0 comments on commit 8f2cd26

Please sign in to comment.