Add interface for notification handler for dimissed events#18297
Add interface for notification handler for dimissed events#18297
Conversation
|
👍 but the name feels weird. It should reflect that it belongs to INotifier? |
other suggestions? |
|
In User/group backends we call them I*Backend. |
|
Lets go for |
|
|
|
I like that even better |
| * This can be useful if dismissing the notification will leave it in an incomplete | ||
| * state. The handler can chose to for example do some default action. | ||
| */ | ||
| interface IHandleDismissedNotification { |
There was a problem hiding this comment.
| interface IHandleDismissedNotification { | |
| interface IHandleDismissedNotification extends INotifier { |
Then you can assume an object is both if you do
if ($notifier instanceof IHandleDismissedNotification) {
...
}There was a problem hiding this comment.
(just like
and friends)There was a problem hiding this comment.
But we can't have more Interfaces in the future, if they are not linear?
There was a problem hiding this comment.
@nickvergessen well you can if they all extend the base notifier
|
See also nextcloud/notifications#508 |
41ff90e to
23e37eb
Compare
|
rebased and squased |
lib/public/Notification/IManager.php
Outdated
| public function isPreparingPushNotification(): bool; | ||
|
|
||
| /** | ||
| * @return void |
There was a problem hiding this comment.
Normally we dont document void, but well :P
Signed-off-by: Roeland Jago Douma <[email protected]>
23e37eb to
2b58181
Compare
For nextcloud/notifications#477