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 Actions and Links to Nextcloud Notification #1048

Open
saandre15 opened this issue Jan 21, 2024 · 3 comments
Open

Add Actions and Links to Nextcloud Notification #1048

saandre15 opened this issue Jan 21, 2024 · 3 comments

Comments

@saandre15
Copy link

saandre15 commented Jan 21, 2024

💡 The Idea

This issue extends upon the existing closed issue #159 . Nextcloud Notification has the option to add links which allows a user to go invoke a URL after clicking on the notification. Nextcloud Notification also has the option to add actions button which gives the user the option to invoke a specific URL based on the action that the user wants to perform. Nextcloud notification does not render links within the body message. See this issue about Nextcloud client link rendering problem.

🔨 Breaking Feature

What I propose is that the Apprise adds additional parameter to the notify_nextcloud specification that supports adding links and actions to the Nextcloud notifications.

As an example we can add the link parameter can be formatted such as the following.

https://admin:[email protected]/user_a?link={uri_encoded(link_to_action)}

The URL would allow the user who receives the notification to click on the notification and perform a defined action.

Another example, would be prompting the user multiple actions using the following formatted link parameters such that the key is the button displayed value and the value is the button URL and button method.

https://admin:[email protected]/user_a?uri_encoded(action_url[key_1]=value_1&action_url[key_2]=value_2&...&action_url[key_n]=value_n)&
uri_encoded(action_method[key_1]=value_1&action_method[key_2]=value_2&...&action_method[key_n]=value_n)

The URL would allow the user who receives the notification to perform actions within the set of definition actions.

As it stands right now, the Apprise API to the Nextcloud notification only informs the Nextcloud end users. However, these changes should allow the Nextcloud end user to conveniently perform actions defined by the administrators using the Apprise API.

@caronc
Copy link
Owner

caronc commented Jan 21, 2024

Hi, is there a reason you closed this ticket off?

@saandre15
Copy link
Author

Hi, is there a reason you closed this ticket off?

The admin notification API does not support links and actions. Only the app notification API supports links and actions. The feature seems feasible to implement, however a Nextcloud Apprise app would have to be created. The apprise notification would interface through the app instead of the default admin notification.

https://github.com/nextcloud/notifications/blob/master/docs/notification-workflow.md

@saandre15 saandre15 reopened this Jan 22, 2024
@caronc
Copy link
Owner

caronc commented Jan 27, 2024

Yeah, having time to review this now, i'm not sure if it would be that straight forward to adapt Apprise to this unless you had an idea?

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

2 participants