Skip to content

Commit

Permalink
fix: missing id arg in message obj
Browse files Browse the repository at this point in the history
Closes #18, fixes #16 completely.
  • Loading branch information
filipporomani committed Dec 5, 2023
1 parent 3681dad commit a5d55a8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Leave feedbacks/report issues freely on GitHub! I'll be glad to help you!

To install the library you can either use pip (latest release version):

``pip install -i https://test.pypi.org/simple/ whatsapp-python==3.0.2.post1`` (the production link doesn't actually work, I'm working on this issue - #16)
``pip install whatsapp-python``

or git (latest development version):

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name="whatsapp-python"
version="3.0.2.post1"
version="3.0.3"
authors = [{name="Filippo Romani", email="[email protected]"}]
description="Open source Python wrapper for the WhatsApp Cloud API"
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions whatsapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ def run(self, host: str = "localhost", port: int = 5000, debug: bool = False, **


class Message(object):
def __init__(self, data: dict = {}, instance: WhatsApp = None, content: str = "", to: str = "", rec_type: str = "individual"): # type: ignore
def __init__(self, id: int = None, data: dict = {}, instance: WhatsApp = None, content: str = "", to: str = "", rec_type: str = "individual"): # type: ignore
try:
self.id = instance.get_message_id(data)
except:
self.id = None
self.id = id
try:
self.type = self.instance.get_message_type(data)
except:
Expand Down
2 changes: 1 addition & 1 deletion whatsapp/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# internal use only

VERSION = "3.0.2.post1"
VERSION = "3.0.3"

0 comments on commit a5d55a8

Please sign in to comment.