Skip to content

Commit d0af61a

Browse files
committed
Refactor and edit doc string
1 parent 076ba7b commit d0af61a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

firebase_admin/_messaging_encoder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,9 @@ def encode_apns(cls, apns):
529529
'APNSConfig.headers', apns.headers),
530530
'payload': cls.encode_apns_payload(apns.payload),
531531
'fcm_options': cls.encode_apns_fcm_options(apns.fcm_options),
532+
'live_activity_token': _Validators.check_string(
533+
'APNSConfig.live_activity_token', apns.live_activity_token),
532534
}
533-
if apns.live_activity_token:
534-
result['live_activity_token'] = _Validators.check_string(
535-
'APNSConfig.live_activity_token', apns.live_activity_token, non_empty=True)
536535
return cls.remove_null_values(result)
537536

538537
@classmethod

firebase_admin/_messaging_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class APNSConfig:
334334
payload: A ``messaging.APNSPayload`` to be included in the message (optional).
335335
fcm_options: A ``messaging.APNSFCMOptions`` instance to be included in the message
336336
(optional).
337-
live_activity_token: An optional string that identifies the live activity to update.
337+
live_activity_token: A live activity token string (optional).
338338
339339
.. _APNS Documentation: https://developer.apple.com/library/content/documentation\
340340
/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

0 commit comments

Comments
 (0)