Source: factory.core/ObjNotifyPush.py
Manages Web Push subscriptions and sends push
notifications via MQTT and the Web Push protocol.
Inherits from ObjData for database connectivity, SQL
helpers, configuration access and logging.
| Method | Signature | Description |
|---|---|---|
| subscribe | subscribe(user: str, subscription_json: str) -> bool |
Store a browser push subscription for user. |
| unsubscribe | unsubscribe(user: str) -> bool |
Remove all push subscriptions for user. |
| get_subscriptions | get_subscriptions(user: str) -> List[Dict[str, str]] |
Return active push subscriptions for user. |
| send_push | send_push(user: str, title: str, body: str, url: str = '', icon: str = '') -> Dict[str, Any] |
Send a push notification to user. |
| send_push_to_group | send_push_to_group(group: str, title: str, body: str, url: str = '') -> Dict[str, Any] |
Send a push notification to all users in group. |
Send a test push notification to a user.