From b70a9b155e965b86a99bb81b1fc0a130a42e4413 Mon Sep 17 00:00:00 2001 From: Afraim Joseph Date: Mon, 2 Mar 2026 04:04:02 +0530 Subject: [PATCH] fix: minor fix in previous commmit and added same to AsyncMessage --- whatsapp/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/whatsapp/__init__.py b/whatsapp/__init__.py index 04588c8..4f6bdea 100644 --- a/whatsapp/__init__.py +++ b/whatsapp/__init__.py @@ -614,7 +614,7 @@ def __init__( self.rec = rec_type try: - self.to = self.instance.get_mobile(data) + self.to = to if to != "" else self.instance.get_mobile(data) except: self.to = to @@ -776,7 +776,10 @@ def __init__( self.type = "text" self.data = data self.rec = rec_type - self.to = to + try: + self.to = to if to != "" else self.instance.get_mobile(data) + except: + self.to = to try: self.content = content if content != "" else self.instance.get_message(data) except: