From 5193579e4f085fc8837a641522ed02570b9b02da Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 20 Sep 2024 13:15:20 +0200 Subject: feat(prioritynotifications): Allow some apps to mark notifications as priority They will be still send as push during DND. Apps are currently limited to: - twofactor_nextcloud_notification to help with login - spreed which will only set it for pushes in manually picked conversations Signed-off-by: Joas Schilling --- lib/public/Notification/INotification.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/public') diff --git a/lib/public/Notification/INotification.php b/lib/public/Notification/INotification.php index 4a35ee59087..6083cca4f9a 100644 --- a/lib/public/Notification/INotification.php +++ b/lib/public/Notification/INotification.php @@ -263,6 +263,18 @@ interface INotification { */ public function getIcon(): string; + /** + * @return $this + * @throws InvalidValueException if the app is not allowed to send priority notifications + * @since 31.0.0 + */ + public function setPriorityNotification(bool $priorityNotification): INotification; + + /** + * @since 31.0.0 + */ + public function isPriorityNotification(): bool; + /** * @return IAction * @since 9.0.0 -- cgit v1.2.3