Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions firebase_admin/_messaging_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ def encode_apns(cls, apns):
'APNSConfig.headers', apns.headers),
'payload': cls.encode_apns_payload(apns.payload),
'fcm_options': cls.encode_apns_fcm_options(apns.fcm_options),
'live_activity_token': _Validators.check_string('APNSConfig.live_activity_token', apns.live_activity_token),
}
return cls.remove_null_values(result)

Expand Down
4 changes: 3 additions & 1 deletion firebase_admin/_messaging_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,18 @@ class APNSConfig:
Args:
headers: A dictionary of headers (optional).
payload: A ``messaging.APNSPayload`` to be included in the message (optional).
live_activity_token: A push to start live activity (optional).
fcm_options: A ``messaging.APNSFCMOptions`` instance to be included in the message
(optional).

.. _APNS Documentation: https://developer.apple.com/library/content/documentation\
/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html
"""

def __init__(self, headers=None, payload=None, fcm_options=None):
def __init__(self, headers=None, payload=None, live_activity_token=None, fcm_options=None):
self.headers = headers
self.payload = payload
self.live_activity_token = live_activity_token
self.fcm_options = fcm_options


Expand Down
Loading