-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Notifications #2295
Notifications #2295
Conversation
[ci skip] [skip ci]
66eabd6
to
f03d557
Compare
This is ready to be merged. Although we're adding SMS and Slack, we're not actually going to add a UX setting this up until we've implemented the new design. If you want, you can go into the |
Just need to fix tests. |
->get() | ||
->reject(function ($subscriber) use ($notified) { | ||
return in_array($subscriber->id, $notified); | ||
})->map(function ($subscriber) use ($incident) { |
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.
I think we should use each
instead of map
here
// First notify all global subscribers. | ||
$globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get(); | ||
|
||
$globalSubscribers->map(function ($subscriber) use ($update) { |
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.
Same here
->get() | ||
->reject(function ($subscriber) use ($notified) { | ||
return in_array($subscriber->id, $notified); | ||
})->map(function ($subscriber) use ($incident) { |
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.
Done! Tests are failing but I'm sure they're unrelated. |
Closes #2107, closes #1023
We're now using Laravel's Notification system, which allows us to work with Mail, Slack and Nexmo natively. Because of this, I've dropped our custom email template & views, switching to the easier template.
As a bonus, the email template is now themed based on the customisation settings.
Before this can be merged, we need a UI for setting up notifications. Also, @joecohens I don't think that unsubscribing is working?