Skip to content

Commit

Permalink
Add FcmOptions attr to Message dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
eighthcolor22 committed Mar 19, 2024
1 parent eaffdb9 commit 799c7f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions async_firebase/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,16 @@ class WebpushConfig:
fcm_options: t.Optional[WebpushFCMOptions] = field(default=None)


@dataclass
class FcmOptions:
"""
Platform independent options for features provided by the FCM SDKs
Arguments:
analytics_label: Label associated with the message's analytics data.
"""
analytics_label: str


@dataclass
class Message:
"""
Expand All @@ -299,6 +309,7 @@ class Message:
token: the registration token of the device to which the message should be sent.
topic: name of the Firebase topic to which the message should be sent (optional).
condition: the Firebase condition to which the message should be sent (optional).
fcm_options: platform independent options for features provided by the FCM SDKs.
"""

token: t.Optional[str] = None
Expand All @@ -309,6 +320,7 @@ class Message:
apns: t.Optional[APNSConfig] = field(default=None)
topic: t.Optional[str] = None
condition: t.Optional[str] = None
fcm_options: t.Optional[FcmOptions] = None


@dataclass
Expand Down

0 comments on commit 799c7f8

Please sign in to comment.