mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Currently, we’re performing a check when a user is suspended in the `UserEmail` job and we’re assuming a `post` is always available, which is not the case. The code indeed breaks when the job is called with the `account_suspended` type option. This patch fixes this issue by making the check use the safe navigation operator, thus making it working when `post` is not provided.