-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Improve notifications #16932
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
Improve notifications #16932
Conversation
@snipe I'm not sure I follow. That doesn't seem to be the case on develop (or this PR's branch). |
# Conflicts: # app/Listeners/CheckoutableListener.php
# Conflicts: # app/Listeners/CheckoutableListener.php
/** | ||
* Register the listeners for the subscriber. | ||
* | ||
* @param Illuminate\Events\Dispatcher $events | ||
*/ | ||
public function subscribe($events) | ||
{ | ||
$events->listen( | ||
\App\Events\CheckoutableCheckedIn::class, | ||
'App\Listeners\CheckoutableListener@onCheckedIn' | ||
); | ||
|
||
$events->listen( | ||
\App\Events\CheckoutableCheckedOut::class, | ||
'App\Listeners\CheckoutableListener@onCheckedOut' | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pulled up from the middle of the class.
@snipe this PR is ready for review. Thought, regarding your comment above, that is not addressed in this PR. |
This PR addresses a few issues around checkout/checkin notifications via updates to the
CheckoutableListener
.This PR adds more tests around notifications to ensure webhooks, alert emails, and emails to users are sent across a variety of category and application configurations.
It might be helpful to see which tests have been added to the tests directory. Taking the tests from this PR and dropping them into the develop branch shows the following failures:
Before this PR if an checkout/checkin alert email was set in notification settings, the "CC Email" would receive two emails:
With this PR one email is sent:
If the user is not going to receive the email the the alert address is promoted to the
to
address:Note: I've removed the randomness of the category factory "using a default eula". This removes some test flakiness but also means our seeders no longer seed categories that use the default eula. That is actually more accurate because the settings are not seeded with a default eula.
This PR should address (#16938 and #16897) and might address #16966
What this PR doesn't address and needs to be followed up on:
Send email to user on checkin/checkout
when there is a EULA (local or global) being used which means users will always get an email on check in even if that is not the intention by the administrator.