Skip to content

Commit

Permalink
Merge pull request #228 from Vonage/bugfix-messages-api
Browse files Browse the repository at this point in the history
Bugfix in messages.py
  • Loading branch information
maxkahan authored Oct 25, 2022
2 parents c577aa7 + c75fe04 commit 6812900
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[bumpversion]
current_version = 3.0.1
current_version = 3.0.2
commit = True
tag = False

[bumpversion:file:src/vonage/__init__.py]

[bumpversion:file:setup.py]

[bumpversion:file:docs/conf.py]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ ENV*
.idea
.pypirc
.pytest_cache
html/
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 3.0.2
- Bugfix in `messages.py` where authentication method was not being checked for correctly, throwing an error when using header auth.

# 3.0.1
- Fixed bug where a JWT was created globally and could expire. Now a new JWT is generated when a request is made.
- Fixed bug where timeout was not passed to session object.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="vonage",
version="3.0.1",
version="3.0.2",
description="Vonage Server SDK for Python",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/vonage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .client import *

__version__ = "3.0.1"
__version__ = "3.0.2"
4 changes: 2 additions & 2 deletions src/vonage/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def __init__(self, client):
self._client = client
self._auth_type = 'jwt'

def send_message(self, params: dict):
def send_message(self, params: dict):
self.validate_send_message_input(params)

if self._client._application_id is None:
if not hasattr(self._client, '_application_id'):
self._auth_type='header'
return self._client.post(
self._client.api_host(),
Expand Down

0 comments on commit 6812900

Please sign in to comment.