diff --git a/app/push_service.py b/app/push_service.py index 466e026..24416c2 100644 --- a/app/push_service.py +++ b/app/push_service.py @@ -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