Skip to content

Commit

Permalink
fix: Push notification can't be sent to topic because token attribute…
Browse files Browse the repository at this point in the history
… marked as required (#56)
  • Loading branch information
akalex authored May 10, 2023
1 parent 505ab41 commit b2df26d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.1.1
* [FIX] The push notification could not be sent to topic because ``messages.Message.token`` is declared as required attribute though it should be optional.
``messages.Message.token`` turned into Optional attribute.

## 3.1.0
* The limit on the number of messages (>= 500) that can be sent using the ``send_all`` method has been restored.

Expand Down
2 changes: 1 addition & 1 deletion async_firebase/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class Message:
condition: the Firebase condition to which the message should be sent (optional).
"""

token: str
token: t.Optional[str] = None
data: t.Dict[str, str] = field(default_factory=dict)
notification: t.Optional[Notification] = field(default=None)
android: t.Optional[AndroidConfig] = field(default=None)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "async-firebase"
version = "3.1.0"
version = "3.1.1"
description = "Async Firebase Client - a Python asyncio client to interact with Firebase Cloud Messaging in an easy way."
license = "MIT"
authors = [
Expand Down

0 comments on commit b2df26d

Please sign in to comment.