Skip to content
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 more information to push notification payload #1291

Open
jwr1 opened this issue Dec 13, 2024 · 0 comments
Open

Add more information to push notification payload #1291

jwr1 opened this issue Dec 13, 2024 · 0 comments
Labels
api API related issues and pull requests enhancement New feature or request

Comments

@jwr1
Copy link
Member

jwr1 commented Dec 13, 2024

Is your feature request related to a problem? Please describe.
At the moment, Interstellar only displays push notification title and message. I would like to extend functionality by adding actions when a notification is tapped on, such as the default action to pull up the page a notification originated from, a mark as read action, or even a reply action.

The current push notification payload is very simple and severely limits any advanced functionality anybody would want to implement. For instance, in order to make notifications clickable and pull up the correct page, I'm going to have to parse the actionUrl property (which is just a URL to the Mbin web client) and figure out what type of notification and the related resource id is associated by the path (and hope the path never changes in the future). Other actions are completely impossible; if I want to mark a notification as read, there's no notificationId to go off of, so I wouldn't know what to send to the API.

Android also has a Message notification style that can format notifications as conversations, and it accepts author names/icons, message time, message body, etc., that I couldn't acquire without either fetching the notification data through api or attempting to parse the push notification body (which wouldn't work at all due to translations).

Describe the solution you'd like
At the very least, it'd be great if the notification payload had a notificationId property; that way, I could access any additional information that's needed by making an API request; it's not ideal, but it would work.

Ideally, the push notification would have all needed information already in the payload; that way, additional requests don't need to be made every time a notification comes in. This might not be feasible though.

@jwr1 jwr1 added enhancement New feature or request api API related issues and pull requests labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API related issues and pull requests enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant