Skip to content

Commit

Permalink
Fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matrozov committed Jan 28, 2022
1 parent fa685fa commit 3e4d7b3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
Expand Down
2 changes: 1 addition & 1 deletion notify_events/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .message import Message

__version__ = "1.1.2"
__version__ = "1.1.3"
5 changes: 3 additions & 2 deletions notify_events/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ def send(self, channel_token: str):
data['actions[' + str(idx) + '][callback_method]'] = action['callback_method']
data['actions[' + str(idx) + '][callback_content]'] = action['callback_content']

for key, value in action['callback_headers'].items():
data['actions[' + str(idx) + '][callback_headers][' + urllib.parse.quote_plus(key) + ']'] = value
if isinstance(action['callback_headers'], dict):
for key, value in action['callback_headers'].items():
data['actions[' + str(idx) + '][callback_headers][' + urllib.parse.quote_plus(key) + ']'] = value

url = self._base_url % channel_token

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# This call to setup() does all the work
setup(
name="notify_events",
version="1.1.2",
version="1.1.3",
description="Extension to integrate your project with Notify.Events service.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down
File renamed without changes.

0 comments on commit 3e4d7b3

Please sign in to comment.