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

Unified push nextcloud notifications #2027

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gavine99
Copy link

@gavine99 gavine99 commented Sep 5, 2024

minimal changes to set the stage to allow the existing 3rd party nextcloud unified push app to send system notifications as push notifications to nextcloud mobile client and talk apps - https://apps.nextcloud.com/apps/uppush / https://codeberg.org/NextPush/uppush.

requires deployment sync with pull request for nextcloud server with same title - Unified push nextcloud notifications - nextcloud/server#47763

these pull requests are independent of, but will ultimately work with, a pull request for the unified push app to enable it to send push notifications to the nextcloud mobile client and talk apps - https://codeberg.org/NextPush/uppush/pulls/17

i have also submitted pr's for the generic (f-droid) android nextcloud client and talk apps to leverage the pr's above to create an end-to-end solution for unified push notifications and talk;

nextcloud mobile client app: nextcloud/android#13516
nextcloud mobile talk app: nextcloud/talk-android#4169

  • this pr fails ci tests because it depends on the related notification app pr

…cations. Signed-off-by: Gavin Element <github@bobfox.top>
@gavine99 gavine99 force-pushed the unified_push_nextcloud_notifications branch from df46667 to 459b9ba Compare September 5, 2024 03:56
@@ -229,7 +229,7 @@ public function deleteNotification(int $id): DataResponse {
$deleted = $this->handler->deleteById($id, $this->getCurrentUser(), $notification);

if ($deleted) {
$this->push->pushDeleteToDevice($this->getCurrentUser(), [$id], $notification->getApp());
$this->manager->notifyDelete($this->getCurrentUser(), $id, $notification);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'd like to be always notified, not only when using the explicit delete?
But also e.g. when someone enters a Talk chat which marks all mention notifications read when they scroll down, Or when they join a call the call notification is removed.

This basically means you would want to be an NotificationApp yourself and listen to the markProcessed handling.

It's a bit weirdly abstracted and not clear (also not aware), but technically it is not required that the notifications app is not the only notification app. That's exactly why the API never operates based on IDs.
I guess you'd like to "be part of it" and basically want to act based on this app's notification id?
Similarly how we do it for the existing Push class:

foreach ($deleted as $user => $notifications) {
foreach ($notifications as $data) {
$this->push->pushDeleteToDevice((string)$user, [$data['id']], $data['app']);
}
}

Best idea that comes to my mind would be to emit an event in this app here with all deleted IDs?

Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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

Successfully merging this pull request may close these issues.

2 participants