🚧 Default icon for push notifications.
continuous-integration/drone/push Build is passing Details

master
parent 3f0462d84c
commit 375df5dc0c

@ -75,7 +75,7 @@ class PushService:
return results
def create_notification_payload(self, title: str, body: str, icon: str = None) -> Dict[str, Any]:
def create_notification_payload(self, title: str, body: str) -> Dict[str, Any]:
"""
Crée un payload de notification standardisé.
@ -90,15 +90,16 @@ class PushService:
payload = {
"notification": {
"title": title,
"body": body
"body": body,
"icon": "assets/icon-128x128.png",
"image": "assets/icon-128x128.png",
"data": {
"onActionClick": {
"default": {"operation": "openWindow", "url": "/map"}
}
}
},
"data": {
"url": "/map"
}
}
if icon:
payload["notification"]["icon"] = icon
return payload

Loading…
Cancel
Save