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

trigger "notification:test-push" via mobile apps (to self test push notifications) #1206

Open
mahibi opened this issue Jun 1, 2022 · 4 comments

Comments

@mahibi
Copy link
Contributor

mahibi commented Jun 1, 2022

It should be possible to trigger

sudo -u www-data php /var/www/yourinstance/occ notification:test-push --talk youruser

via API, so the mobile apps could have a "Test Notifications" button in the settings-view.

That notification should be catched on mobile clients and they show a success dialog.
If notification is not received within x seconds, show a dialog with the link to the troubleshooting checklist etc.

With this every user could check that pushproxy is working or not and it can be narrowed down why a notifications is not shown..
If possible, also give feedback to the mobile clients that the "notification:test-push" command was successfully executed on server...

@nickvergessen
Copy link
Member

Current issue is that all notification handling is user based and using a real notification.
It would be good enough if that is still the case, but the push only happens to this one device, right?

@mahibi
Copy link
Contributor Author

mahibi commented Jun 2, 2022

Current issue is that all notification handling is user based and using a real notification. It would be good enough if that is still the case, but the push only happens to this one device, right?

sure. all we need would be a new type for the notification, like "selfcheck"?
and if possible maybe add a timestamp to the message when the "notification:test-push" was executed? so we could show in the dialog how long it took to reach the phone..?

@provokateurin
Copy link
Member

As far as I can tell this feature is currently not possible to implement, because the OCP IManager does not expose a way to send a notification to a single token and not to the all the devices a user has, right?
IMO it would also be fine to just send a self-test notification to all devices. Devices that are not doing the self-test at the moment the notification is received can just ignore it. The downside of that would be that older clients wouldn't know how to handle such a notification and possibly crash or display strange popup notifications.

@nickvergessen
Copy link
Member

Since we are the app that handles pushing, we can add an endpoint to do exactly that ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants