-
Notifications
You must be signed in to change notification settings - Fork 56
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 rich object support to API #1973
Conversation
Anything that is doing rich objects sounds like it should have it's own notifier and not abuse this one? Maybe you can give a sample of what you are trying to do? |
🐢 Performance warning. |
I do not see as abuse to be able to use notifications features through the API. It allows external applications and scripts to benefit from them.
This is for the future worflows using windmill, to allow them to add notifications with links by using the On the same note, what is the reason for the public API to not return the notification id when it’s created, and allow to delete it if it gets obsolete? |
Yes and no, app is kind of "dumb". It just passes things on. So there is no validation if you can still access a file, the user got deleted, etc. That's why the current take always was: if you are an app, you have PHP code anyway, you should register your own provider and handle the notifications yourself. But yeah I can see how it makes sense for highlight and some other things, but we basically have to trust admins to not make a mess. if they provide wrong/invalid file data the frontend and clients might break during rendering.
If you keep the current parameter names it could also be possible to just add
The main issue is that there are multiple apps that registered as |
ExApps and clients do not have PHP code and cannot register their own providers.
Isn't this already a problem that should be handled in clients? |
So I locally started to add the id, but it's a bit weird. Admins don't have an option to delete a notification for another user :P Something to add I guess |
c0ef469
to
1d52255
Compare
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
1d52255
to
555568b
Compare
Signed-off-by: Côme Chilliet <[email protected]>
Rebased and fixed the tests, this looks good enough for merging in my opinion. |
Add rich object support to both subject and message in the API to create notifications from an admin account.
TODO:
0
instead of'parsed'
)Should we allow to set icon?