-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new notification properties to api/v1/notifications
endpoint
#466
Comments
Yeah, title for sure would be a good one. I refactored the cloud code to care as little as possible about the notification payload, basically to act as a pass through medium from openHAB to the device, only touching/modifying the data when necessary. Was hoping to not have to update it overtime we add a new payload value. I think i might store the raw JSON payload in mongod, and return a combined result (so all keys). I'll take a look. |
Fixes openhab#466 Signed-off-by: Dan Cunningham <[email protected]>
with #467 notifications would return what they did before, plus the raw payload of what openHAB sent, for example {
"_id": "668096d5fc15ce1a1d37f103",
"message": "Test Message",
"payload": {
"media-attachment-url": "item:imageItem",
"message": "Test Message",
"title": "Test",
"on-click": "ui:popup:widget:test",
"actions": [
{
"title": "Button 1",
"action": "command:myItem:ON"
},
{
"title": "Button 2",
"action": "ui:popup:widget:myWidget"
}
]
},
"created": "2024-06-29T23:20:53.216Z",
"__v": 0
} Does this work for you ? |
Additionally , in time, we can remove the duplicate fields like message, icon and severity from the original structure and just rely on the payload,. |
Yes, that works for me 👍 |
Great, i'll deploy this today after i run a few more tests. |
Thats deployed |
It seems that the new notification properties haven't been added to the endpoint
api/v1/notifications
. This endpoint is used for the notification list and in the un-googled version of the Android app.I'm not sure if the actions should be shown in the notification list, but at least the title should be shown there.
The text was updated successfully, but these errors were encountered: