diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-06-09 17:02:07 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-06-09 17:02:07 +0100 |
commit | ef777353e5dda764874b713ff131d36868e94371 (patch) | |
tree | 311fdef6d2e52bdf89b2560706daa54e1c838bbc /perllib/FixMyStreet/Script/Alerts.pm | |
parent | abc63a85b47bbc6b9e81c8256a226864ac7fe0ce (diff) | |
parent | e210a3576aa4fe247feafe4f7c0d27e308faba86 (diff) |
Merge branch 'alert-active-deletion'
Diffstat (limited to 'perllib/FixMyStreet/Script/Alerts.pm')
-rw-r--r-- | perllib/FixMyStreet/Script/Alerts.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Script/Alerts.pm b/perllib/FixMyStreet/Script/Alerts.pm index cb1f022fa..d07728092 100644 --- a/perllib/FixMyStreet/Script/Alerts.pm +++ b/perllib/FixMyStreet/Script/Alerts.pm @@ -307,6 +307,10 @@ sub _send_aggregated_alert_email(%) { # Ignore phone-only users return unless $data{alert_user}->email_verified; + # Mark user as active as they're being sent an alert + $data{alert_user}->set_last_active; + $data{alert_user}->update; + my $email = $data{alert_user}->email; my ($domain) = $email =~ m{ @ (.*) \z }x; return if $data{schema}->resultset('Abuse')->search( { |