From 8f2cd2668b99e7c3afc7ec70ec72635f33dbbf9c Mon Sep 17 00:00:00 2001 From: Winner Le Paradoxe Konou Date: Thu, 10 Oct 2024 17:45:40 +0000 Subject: [PATCH] fix: send_location() error (#42) --- whatsapp/ext/_send_media.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/whatsapp/ext/_send_media.py b/whatsapp/ext/_send_media.py index ffa7e7c..1c45c87 100644 --- a/whatsapp/ext/_send_media.py +++ b/whatsapp/ext/_send_media.py @@ -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 = {