-
Notifications
You must be signed in to change notification settings - Fork 22
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
Configurable killmail processing #67
base: master
Are you sure you want to change the base?
Configurable killmail processing #67
Conversation
Would love some 👀 on this one! There are more tweaks I would love to have but this is a start. |
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.
filtering action have to be moved to routing rather than parsers.
except this, I wonder if it would not be better to move the new config part in settings instead.
it offer the benefits to be easier to update - and could be used for other features (some people would be able to grant sign-in to only a limited scope of character - ie: being part of the alliance)
* | ||
* @package Seat\Notifications\Notifications | ||
*/ | ||
class AbstractKillmailNotification extends AbstractNotification |
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.
missing abstract
keyword if class is Abstract*
*/ | ||
protected function shouldProcessKillmail($notifiable) { | ||
|
||
$killmailConfig = config('notifications.killmails'); |
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 keep config for either static content or server configuration (ie: mysql, redis, menu etc...)
What about using settings
instead ? We would create a new pane in SeAT Settings
area where instance owner would be able to define corporations and alliances to which the instance is related.
Other features like limited sign-in could also benefits of such settings.
* @return \Illuminate\Notifications\Messages\MailMessage | ||
*/ | ||
public function toMail($notifiable) | ||
{ | ||
|
||
if (! parent::shouldProcessKillmail($notifiable)) { |
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 should be done in routing section (via
) - not the parser (toX
) - since a notification is already ready to be sent at this stage
* @return SlackMessage | ||
*/ | ||
public function toSlack($notifiable) | ||
{ | ||
|
||
if (! parent::shouldProcessKillmail($notifiable)) { |
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 should be done in routing section (via
) - not the parser (toX
) - since a notification is already ready to be sent at this stage
Configurable Killmail Processing
New Configs
New Behavior