diff --git a/.gitignore b/.gitignore index bb40183..8e80ca5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + # Distribution / packaging .Python build/ diff --git a/notify_events/__init__.py b/notify_events/__init__.py index 9bb1905..3c9938d 100644 --- a/notify_events/__init__.py +++ b/notify_events/__init__.py @@ -1,3 +1,3 @@ from .message import Message -__version__ = "1.1.2" \ No newline at end of file +__version__ = "1.1.3" \ No newline at end of file diff --git a/notify_events/message.py b/notify_events/message.py index 0df4af4..356edbd 100644 --- a/notify_events/message.py +++ b/notify_events/message.py @@ -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 diff --git a/setup.py b/setup.py index 8e8b96e..14310f9 100644 --- a/setup.py +++ b/setup.py @@ -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", diff --git a/my.py b/test.py similarity index 100% rename from my.py rename to test.py