Skip to content

Commit

Permalink
Fixed contact throwing 'not defined' errors (mukulhase#536)
Browse files Browse the repository at this point in the history
* Fixed contact throwing 'not defined' errors

* Update contact.py
  • Loading branch information
tgodoib authored and mukulhase committed Apr 15, 2019
1 parent 1bc0b1a commit d5280ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions webwhatsapi/objects/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ def __init__(self, js_obj, driver=None):
:param driver:
:type driver: WhatsAPIDriver
"""

self.short_name = None
self.push_name = None
self.formatted_name = None
self.profile_pic = None
self.verified_name = None
self.is_business = False

super(Contact, self).__init__(js_obj, driver)
if 'shortName' in js_obj:
self.short_name = js_obj["shortName"]
Expand Down

0 comments on commit d5280ca

Please sign in to comment.