-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
Support extra data in message #120
Comments
If you don't like adding fields to messages, here is an alternative with syntax similar to go compiler directives: use specialized directives embedded in messages to provide extras: For example, the message would look like:
Benefits:
Setbacks:
|
This is definitely going into the right direction. Great stuff! I would vote for the first proposal, it is more structured and clean. |
Great Idea! We should probably implement it before we fully release the plugin-api. Otherwise, we had to release a new gotify/plugin-api version which I'd like to prevent. I'm in favor of the extra "extras" property on the Message struct. Some side note: If we implement e2e we shouldn't do this via extra properties. It seems like a hacky approach to me (:. |
Maybe we can use a milestone to track these TODOs before issuing the next version.
I am not very certain about whether a unified or split config is better, since webUI and android are very different user interfaces. If we are certain to add the extra field into the milestone, we can discuss this further in #119 and gotify/android#44.
I think this is the best way to implement E2E while keeping gotify simple. I thought about having a dedicated message structure for E2E messages but I proposed this instead. The reasons are:
The biggest setback for this implementation would be that other extras would not be encrypted. Still, let's bring discussion about the detailed implementation on E2E in #63 |
Is the schema here implying that only Android clients would/should implement actions? My desktop notifications also support actions, for example. In fact there is already a standard for such notifications, maybe it could be borrowed? E.g. take a look at this implementation: https://www.npmjs.com/package/freedesktop-notifications Lots of info about the ecosystem here: https://wiki.archlinux.org/index.php/Desktop_notifications |
@mwild1 Looks good, if there is a standard for it then gotify should use it. |
Since gotify is not specifically designed for mobile notifications, and there are more and more requests on extending the message structure such as #63 and #119. A simple
message
field is a little too limited to process multiple kinds of messages. I propose adding an extras field in the message struct in the next major version of gotify which is passed to the client, and the client would try to interpret these extra fields when they could understand them.The message struct would look like this:
And the message could be sent like this:
The
android:*
will only be rendered on Android clients.Other optional features such as E2E encryption:
This would not be difficult to implement on the server side but it would definitely pave the way for future implementations on more powerful features based on the messages.
The text was updated successfully, but these errors were encountered: