Skip to content

Remove PostAtRisk recipient fallback once old queued mails are drained #376

Description

@paulocastellano

App\Mail\PostAtRisk now takes the recipient so the at-risk times render in the recipient's time zone and 12h/24h clock. Mails queued by the previous release carry no recipient, so the recipient was made nullable with a fallback to the workspace owner (the person those mails always went to). That fallback only exists to survive the deploy with a full queue.

Once no PostAtRisk mail queued before the deploy is left, remove it:

  • Confirm no queued PostAtRisk job without a recipient remains (check the queue / failed jobs).
  • app/Mail/PostAtRisk.php: make $recipient a required promoted constructor property again (public User $recipient), drop the ?User $recipient = null default and the private recipient() fallback to $this->workspace->owner, and read $this->recipient directly in content() and atRiskGroups().
  • tests/Feature/Mail/PostAtRiskTest.php: delete the test "a payload queued without a recipient renders for the workspace owner".
  • Run tests/Feature/Mail, tests/Feature/Jobs/VerifyUpcomingPostConnectionsTest.php and tests/Feature/Jobs/SendNotificationTest.php on PostgreSQL and MySQL.

Suggested timing: one to two weeks after the deploy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions