Skip to content

Commit

Permalink
Fixes #86
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrinch committed Oct 21, 2019
1 parent a446cce commit 79c1f59
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fcm_django/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__author__ = "xTrinch"
__email__ = "mojca.rojko@gmail.com"
__version__ = "0.2.21"
__version__ = "0.3.0"


class NotificationError(Exception):
Expand Down
19 changes: 15 additions & 4 deletions fcm_django/fcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def fcm_send_topic_message(
title_loc_args=None,
content_available=None,
timeout=5,
extra_notification_kwargs=None,
extra_kwargs={}):

if api_key is None:
Expand Down Expand Up @@ -56,7 +57,8 @@ def fcm_send_topic_message(
title_loc_args=title_loc_args,
content_available=content_available,
timeout=timeout,
extra_kwargs=extra_kwargs
extra_kwargs=extra_kwargs,
extra_notification_kwargs=extra_notification_kwargs,
)

return result
Expand Down Expand Up @@ -88,6 +90,7 @@ def fcm_send_message(
extra_kwargs={},
api_key=None,
json_encoder=None,
extra_notification_kwargs=None,
**kwargs):

"""
Expand Down Expand Up @@ -159,6 +162,7 @@ def fcm_send_message(
title_loc_args=title_loc_args,
content_available=content_available,
extra_kwargs=extra_kwargs,
extra_notification_kwargs=extra_notification_kwargs,
**kwargs
)

Expand All @@ -181,7 +185,9 @@ def fcm_send_single_device_data_message(
content_available=None,
api_key=None,
timeout=5,
json_encoder=None):
json_encoder=None,
extra_notification_kwargs=None,
):
"""
Send push message to a single device
All arguments correspond to that defined in pyfcm/fcm.py.
Expand Down Expand Up @@ -238,7 +244,8 @@ def fcm_send_single_device_data_message(
dry_run=dry_run,
data_message=data_message,
content_available=content_available,
timeout=timeout
timeout=timeout,
extra_notification_kwargs=extra_notification_kwargs,
)


Expand Down Expand Up @@ -268,6 +275,7 @@ def fcm_send_bulk_message(
extra_kwargs={},
api_key=None,
json_encoder=None,
extra_notification_kwargs=None,
**kwargs):
"""
Copied from https://github.com/olucurious/PyFCM/blob/master/pyfcm/fcm.py:
Expand Down Expand Up @@ -340,6 +348,7 @@ def fcm_send_bulk_message(
title_loc_args=title_loc_args,
content_available=content_available,
extra_kwargs=extra_kwargs,
extra_notification_kwargs=extra_notification_kwargs,
**kwargs
)

Expand All @@ -362,6 +371,7 @@ def fcm_send_bulk_data_messages(
data_message=None,
content_available=None,
timeout=5,
extra_notification_kwargs=None,
json_encoder=None):
"""
Arguments correspond to those from pyfcm/fcm.py.
Expand Down Expand Up @@ -416,7 +426,8 @@ def fcm_send_bulk_data_messages(
dry_run=dry_run,
data_message=data_message,
content_available=content_available,
timeout=timeout
timeout=timeout,
extra_notification_kwargs=extra_notification_kwargs,
)


Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
except ImportError:
from distutils.core import setup

VERSION = '0.2.21'
VERSION = '0.3.0'

CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -32,7 +32,7 @@
"fcm_django/management/commands",
],
install_requires=[
'pyfcm==1.4.5',
'pyfcm==1.4.7',
'django-uuidfield==0.5.0',
'Django'
],
Expand Down

0 comments on commit 79c1f59

Please sign in to comment.