discourse/app/jobs/regular
Blake Erickson 67dec38f31 FIX: Gravatar download attempt if user is missing their email
It is possible that a user could exist without an email, if so we should
not enqueue a job to download their gravatar.

This commit resolves this error that can occur:

```
Job exception: undefined method `email' for nil:NilClass
/var/www/discourse/app/models/user.rb:1204:in `email'
/var/www/discourse/app/jobs/regular/update_gravatar.rb:12:in `execute'
```

This commit also fixes the original spec which actually was wrong. The
job never enqueued in the original spec and so the gravatar was never
actually updated and the test was checking if the two values were the
same, but they were both null and never updated, so of course they were
the same!

A new test has also been added to make sure the gravatar job isn't
enqueued when a user's email is missing.
2020-09-02 20:19:46 -06:00
..
admin_confirmation_email.rb
anonymize_user.rb
automatic_group_membership.rb
backup_chunks_merger.rb
bulk_grant_trust_level.rb
bulk_invite.rb
bulk_user_title_update.rb
bump_topic.rb
confirm_sns_subscription.rb
crawl_topic_link.rb
create_avatar_thumbnails.rb
create_backup.rb
create_user_reviewable.rb
critical_user_email.rb
delete_inaccessible_notifications.rb
delete_replies.rb
delete_topic.rb
download_avatar_from_url.rb
download_backup_email.rb
download_profile_background_from_url.rb
emit_web_hook_event.rb
enable_bootstrap_mode.rb
export_csv_file.rb DEV: Switch to new ExportUserArchive job 2020-08-28 11:46:53 -07:00
export_user_archive.rb FIX: User export category preferences on a deleted category. (#10573) 2020-09-01 13:22:59 -07:00
feature_topic_users.rb
generate_topic_thumbnails.rb
group_smtp_email.rb
invite_email.rb
invite_password_instructions_email.rb
make_embedded_topic_visible.rb
mass_award_badge.rb
notify_category_change.rb
notify_mailing_list_subscribers.rb FIX: don't send mailing list for post with empty content (#10577) 2020-09-03 08:58:25 +10:00
notify_moved_posts.rb
notify_post_revision.rb
notify_reviewable.rb FIX: sync reviewable count when opening the hamburger menu (#10368) 2020-08-07 18:13:02 +02:00
notify_tag_change.rb FEATURE: don't notify about changed tags for a private message (#10408) 2020-08-13 17:22:34 +10:00
post_alert.rb
process_bulk_invite_emails.rb
process_email.rb
process_post.rb
process_sns_notification.rb
publish_topic_to_category.rb
pull_hotlinked_images.rb REFACTOR: Refactor pull_hotlinked_images job 2020-08-05 12:14:59 +01:00
push_notification.rb
rebake_custom_emoji_posts.rb
rebake_posts_for_upload.rb
retrieve_topic.rb
run_heartbeat.rb
send_push_notification.rb
send_system_message.rb
suspicious_login.rb
toggle_topic_closed.rb FIX: Clean up toggle closed topic timer when user is not authorized. 2020-08-26 12:59:05 +08:00
topic_action_converter.rb
topic_reminder.rb
truncate_user_flag_stats.rb
unpin_topic.rb
update_gravatar.rb FIX: Gravatar download attempt if user is missing their email 2020-09-02 20:19:46 -06:00
update_group_mentions.rb
update_s3_inventory.rb
update_top_redirection.rb
update_topic_upload_security.rb
update_username.rb FIX: Don't raise error in update username job if user has been deleted. 2020-09-02 11:17:17 +08:00
user_email.rb