Commit graph

66 commits

Author SHA1 Message Date
Richard Steinmetz
f95ce30994
feat: indicate reason for preloading notifications
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-08-18 15:28:46 +02:00
Richard Steinmetz
ad39dab6ca
feat(notifications): provide method to preload many notifications at once
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-08-06 09:22:56 +02:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Joas Schilling
656dc478e5
fix(notifications): Fix check for hasNotifiers when all apps use RegistrationContext
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-04 06:32:26 +02:00
gavine99
ed6d76ec8d
fix(notifications): Change notification app orders
The notification manager always calls notify() of the 'main' notifications app
before other notify apps, and calls other functions for other notifications apps
before the 'main' notification app

Signed-off-by: gavine99 <github@xymail.tk>
2025-04-01 12:27:24 +02:00
Joas Schilling
5193579e4f
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 <coding@schilljs.com>
2024-09-23 09:02:48 +02:00
Côme Chilliet
117c7ee654
fix: Fix Event and Notification creation with the new required parameter
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-17 14:37:55 +02:00
Côme Chilliet
70a886ce83
feat: Add OCP interface to format richtext into string
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-17 13:57:33 +02:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +02:00
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00
Joas Schilling
874525425c
fix(notifications): Add a warning when using relative links
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-12 10:30:39 +02:00
Joas Schilling
6545fed34a
fix(notifications): Throw AlreadyProcessedException also from the manager when it's done
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-12 10:30:38 +02:00
Joas Schilling
0d0c2cdaa0
fix(notifications): Add a dedicated exception when a notification was not parsed completely
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-12 10:30:38 +02:00
Joas Schilling
c8e4a29dfa
fix(notifications): Add a dedicated exception when the notification is unknown to the notifier
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-12 10:30:37 +02:00
Joas Schilling
2c6ecef90f
fix(notifications): Add a dedicated exception when not all fields are set while saving a notification
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-12 10:30:37 +02:00
Joas Schilling
834bd13e28
fix(notifications): Add a dedicated exception when invalid values are set
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-12 09:23:15 +02:00
Joas Schilling
fd679e2018
fix(notifications): Help finding missing notifications by logging it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-02-20 16:03:42 +01:00
Maxence Lange
71bdda42e4 initialize variables
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-01-04 10:59:22 -01:00
Hamid Dehnavi
82a503a50a Make adjustments based on the review
Co-authored-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2024-01-02 16:54:54 +01:00
Hamid Dehnavi
32ee6f7d04 Add adjustments based on the review
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2024-01-02 16:54:54 +01:00
Hamid Dehnavi
0ac1480be2 refactor lib/private/Notification
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2024-01-02 16:54:54 +01:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Côme Chilliet
f676076482
Throw on missing type of rich subject parameter
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-08 17:17:58 +01:00
Côme Chilliet
8a04bf5584 Apply the same changes to richToParsed in Notification
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-29 14:36:29 +00:00
Côme Chilliet
323963e540 Compute parsed from rich subject and message in Notification
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-29 14:36:29 +00:00
Joas Schilling
d1f2e5e967
Increase the fair-use push limit to 1.000 users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-11-18 15:39:23 +01:00
Joas Schilling
6ea4ef9521
Revert "Appropriate length check in Notification.php" 2022-11-14 11:14:13 +01:00
natoponen
bd7a1e4dcb
Appropriate length check in Notification.php
There is an issue(bug) when using UTF-8 symbols in any method, which checks the length of string as `isset($id[64])`. You can set only 32 UTF-8 symbols because they are 2 byte, and this "array" check seems inapropriate in this case, as it throws unexpected exceptions.

Signed-off-by: natoponen <57988162+natoponen@users.noreply.github.com>
2022-11-08 10:45:58 +03:00
Joas Schilling
85eb3b2920
Fix wording of undeliverable push notifications
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-08-31 12:42:31 +02:00
Louis
f6081e35b4
Remove ITimeFactory
Signed-off-by: Louis <6653109+artonge@users.noreply.github.com>
2022-08-17 10:46:08 +02:00
Louis
dc5cdfb7e3
Remove time check in isFairUseOfFreePushService
What the TODO say, the dev does.

Signed-off-by: Louis <6653109+artonge@users.noreply.github.com>
2022-08-16 16:46:03 +02:00
Carl Schwan
aeecb72e96
Fix a few psalm issues and moved back to psalm/phar 4.18
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-12 20:03:06 +01:00
Joas Schilling
9a18bd7abf
Improve wording
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-27 10:12:30 +02:00
Joas Schilling
b578a1e8b5
Fair use of push notifications
We want to keep offering our push notification service for free, but large
users overload our infrastructure. For this reason we have to rate-limit the
use of push notifications. If you need this feature, consider setting up your
own push server or using Nextcloud Enterprise.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-23 00:54:50 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Roeland Jago Douma
808e589035 Allow registering NotifierServices trough IBootstrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-04-16 13:56:28 +02:00
Morris Jobke
24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-11 13:14:41 +01:00
Joas Schilling
3d559159f0
Allow notification apps to defer and flush the sending
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-03 16:44:43 +02:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst
1b46621cd3
Update license headers for 18
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Roeland Jago Douma
2b581814f3
Add interface for notification handler for dimissed events
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-10 10:02:24 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Joas Schilling
594efca1e3
Update since to the correct version
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-16 16:58:38 +02:00
Joas Schilling
55f5bc79a1
Keep the old method as a fallback and adjust the tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-16 11:36:32 +02:00
Joas Schilling
865c12aa0e
Fix detection of Notifiers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-15 15:12:43 +02:00
Joas Schilling
9690b3153a
Change how Notifiers and Apps are registered
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-15 15:12:42 +02:00
Joas Schilling
9b288cda6d
Make all interfaces strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-15 15:12:40 +02:00
John Molakvoæ (skjnldsv)
e9351ef779
Add strict type on Notifications tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-06-13 14:58:38 +02:00
John Molakvoæ (skjnldsv)
49d5030a53
Fix userid casting in notifications
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-06-11 16:53:20 +02:00