Skip to content

Commit

Permalink
Add fcm options attr to multicast message
Browse files Browse the repository at this point in the history
  • Loading branch information
eighthcolor22 committed Mar 20, 2024
1 parent 8b564ca commit eb3f5b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions async_firebase/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ async def send_multicast(
android=multicast_message.android,
webpush=multicast_message.webpush,
apns=multicast_message.apns,
fcm_options=multicast_message.fcm_options,
)
for token in multicast_message.tokens
]
Expand Down Expand Up @@ -544,6 +545,7 @@ async def send_each_for_multicast(
android=multicast_message.android,
webpush=multicast_message.webpush,
apns=multicast_message.apns,
fcm_options=multicast_message.fcm_options,
)
for token in multicast_message.tokens
]
Expand Down
2 changes: 2 additions & 0 deletions async_firebase/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class MulticastMessage:
android: an instance of ``messages.AndroidConfig`` (optional).
webpush: an instance of ``messages.WebpushConfig`` (optional).
apns: an instance of ``messages.ApnsConfig`` (optional).
fcm_options: platform independent options for features provided by the FCM SDKs.
"""

tokens: t.List[str]
Expand All @@ -344,6 +345,7 @@ class MulticastMessage:
android: t.Optional[AndroidConfig] = field(default=None)
webpush: t.Optional[WebpushConfig] = field(default=None)
apns: t.Optional[APNSConfig] = field(default=None)
fcm_options: t.Optional[FcmOptions] = None


@dataclass
Expand Down

0 comments on commit eb3f5b3

Please sign in to comment.