-
-
Notifications
You must be signed in to change notification settings - Fork 702
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
Allow sending custom properties in POSTed JSON #827
Comments
What would be the goal of this? Why not just send a custom JSON string as the body of the notification? |
The ntfy server currently only understands predefined properties in the POSTed JSON. Added custom properties do not get forwarded to the frontend. Use case is for self-hosted nfty servers with a custom frontend that needs fields beyond the known This is the relevant discussion with @binwiederhier . |
I understand what you're asking for (and I agree with binwiederhier that it'd probably be easy to implement), but I don't understand why sending an (escaped) JSON string as the body of the message doesn't work. If you're already building a custom frontend, then you don't need to use any of ntfy's existing fields (except to get your JSON string out). The current ntfy response looks like this:
You want to change it to this:
Then, after Why not do this?
Then, after |
Just opened the issue because as @binwiederhier suggested Yes, what you propose would work. I'm not saying it wouldn't. |
Got it. I hope you don't feel like I am dismissing the value of your proposal. I know other people have already been sending JSON strings with custom fields as the And I'm sure they will also be happy to have a convenient I will see if I can implement this sometime this week. |
I don't feel like that at all. I completely understand you asking for justification esp. when it comes to feature requests. After all it is I who makes a request for your time and effort. Much appreciated regardless of whether you go ahead with its implementation or not. |
Any update on this? |
Nope. Sorry. I've been busy with work and haven't been able to finish the Android side of things yet |
💡 Idea
When publishing a notification using JSON, it would be useful to allow sending additional custom properties which will be forwarded verbatim to the mobile front end (assuming one uses a self-hosted ntfy server and builds their own mobile app). These additional properties could be nested under the toplevel
"extras"
property in the POSTed JSON.💻 Target components
This is a feature request for the ntfy server.
Example:
The text was updated successfully, but these errors were encountered: