Skip to content

Commit a342524

Browse files
authored
fix: minor fix in previous commmit and added same to AsyncMessage (#64)
1 parent 2618872 commit a342524

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

whatsapp/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def __init__(
614614
self.rec = rec_type
615615

616616
try:
617-
self.to = self.instance.get_mobile(data)
617+
self.to = to if to != "" else self.instance.get_mobile(data)
618618
except:
619619
self.to = to
620620

@@ -776,7 +776,10 @@ def __init__(
776776
self.type = "text"
777777
self.data = data
778778
self.rec = rec_type
779-
self.to = to
779+
try:
780+
self.to = to if to != "" else self.instance.get_mobile(data)
781+
except:
782+
self.to = to
780783
try:
781784
self.content = content if content != "" else self.instance.get_message(data)
782785
except:

0 commit comments

Comments
 (0)