File tree Expand file tree Collapse file tree
notifications/services/push Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 NOTIFICATION_DEFAULT_TITLE = "WebBuddhist" ,
4141 NOTIFICATION_DEFAULT_BODY = "Time for your daily practice." ,
4242
43+ NOTIFICATION_DISPATCH_SECRET_TOKEN = "Dispatch" ,
4344 # Optional Redis idempotency during dispatch
4445 NOTIFICATION_IDEMPOTENCY_ENABLED = "false" ,
4546 NOTIFICATION_IDEMPOTENCY_TTL_SECONDS = 3600 ,
Original file line number Diff line number Diff line change @@ -61,7 +61,18 @@ def is_fcm_configured() -> bool:
6161 return bool (get ("GOOGLE_CLOUD_PROJECT" ).strip ())
6262
6363
64+ def _normalize_platform (platform : str ) -> str :
65+ value = platform
66+ if hasattr (platform , "value" ):
67+ value = platform .value
68+ value = str (value )
69+ if "." in value :
70+ value = value .rsplit ("." , 1 )[- 1 ]
71+ return value .lower ()
72+
73+
6474def is_push_configured (platform : str ) -> bool :
65- if platform in ("android" , "ios" ):
75+ normalized = _normalize_platform (platform )
76+ if normalized in ("android" , "ios" ):
6677 return is_fcm_configured ()
6778 return False
You can’t perform that action at this time.
0 commit comments